leetquery


Nameleetquery JSON
Version 0.2.5 PyPI version JSON
download
home_pagehttps://github.com/ShuYuHuang/leetquery
SummaryQuery and analyze data from leetcode
upload_time2023-08-11 01:31:50
maintainer
docs_urlNone
authorShu-Yu Huang
requires_python>=3.7.0
licenseMIT
keywords
VCS
bugtrack_url
requirements requests pandas
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# LeetQuery

[![PyPI version](https://badge.fury.io/py/leetquery.svg)](https://badge.fury.io/py/leetquery) ![Test](https://github.com/ShuYuHuang/leetquery/actions/workflows/python-app.yml/badge.svg)  [![Downloads](https://static.pepy.tech/badge/leetquery)](https://pepy.tech/project/leetquery)

A library for retriving Human Resource information from Leetcode.

## Install
``` shell
    pip install leetquery
```
## Usage
### Retrieving User Submissions
Just enter user name and limit of query!
``` python
from leetquery.user import get_submissions

submissions = get_submissions(username="syhaung", limit=12)
```
return value:
```
["question1", "question2", ...]
```

### For Problems
#### Retrieving Problem Discription
Just enter probelm nameSlug and get the problem discription in HTML~~
``` python
from leetquery.problem import get_discription

submissions = get_discription(problemname="two-sum")
```
return value:
``` html
<p>Given an array of integers <code>nums</code>&nbsp;and an integer <code>target</code>, return <em>indices of the two numbers such that they add up to <code>target</code></em>.</p>
...
```
#### Retrieving Problem Statistics
Get the statistics for the problem in a JSON format, help you quantize difficulties
``` python
from leetquery.problem import get_stats
stat = get_stats("two-sum")
assert isinstance(stat, dict) and \
    list(stat.keys()) == ['totalAccepted', 'totalSubmission', 'totalAcceptedRaw', 'totalSubmissionRaw', 'acRate']
```
return value:
``` json
{
    'totalAccepted': '10.4M',
    'totalSubmission': '20.6M',
    ...
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ShuYuHuang/leetquery",
    "name": "leetquery",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Shu-Yu Huang",
    "author_email": "b123767195@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/82/55/40c69c5cf4481ee82170a9ea444566348fa63b2e39d3e16e6221b05c8145/leetquery-0.2.5.tar.gz",
    "platform": null,
    "description": "\n# LeetQuery\n\n[![PyPI version](https://badge.fury.io/py/leetquery.svg)](https://badge.fury.io/py/leetquery) ![Test](https://github.com/ShuYuHuang/leetquery/actions/workflows/python-app.yml/badge.svg)  [![Downloads](https://static.pepy.tech/badge/leetquery)](https://pepy.tech/project/leetquery)\n\nA library for retriving Human Resource information from Leetcode.\n\n## Install\n``` shell\n    pip install leetquery\n```\n## Usage\n### Retrieving User Submissions\nJust enter user name and limit of query!\n``` python\nfrom leetquery.user import get_submissions\n\nsubmissions = get_submissions(username=\"syhaung\", limit=12)\n```\nreturn value:\n```\n[\"question1\", \"question2\", ...]\n```\n\n### For Problems\n#### Retrieving Problem Discription\nJust enter probelm nameSlug and get the problem discription in HTML~~\n``` python\nfrom leetquery.problem import get_discription\n\nsubmissions = get_discription(problemname=\"two-sum\")\n```\nreturn value:\n``` html\n<p>Given an array of integers <code>nums</code>&nbsp;and an integer <code>target</code>, return <em>indices of the two numbers such that they add up to <code>target</code></em>.</p>\n...\n```\n#### Retrieving Problem Statistics\nGet the statistics for the problem in a JSON format, help you quantize difficulties\n``` python\nfrom leetquery.problem import get_stats\nstat = get_stats(\"two-sum\")\nassert isinstance(stat, dict) and \\\n    list(stat.keys()) == ['totalAccepted', 'totalSubmission', 'totalAcceptedRaw', 'totalSubmissionRaw', 'acRate']\n```\nreturn value:\n``` json\n{\n    'totalAccepted': '10.4M',\n    'totalSubmission': '20.6M',\n    ...\n}\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Query and analyze data from leetcode",
    "version": "0.2.5",
    "project_urls": {
        "Homepage": "https://github.com/ShuYuHuang/leetquery"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "28465f2a5f15ccb5d207fe363ec13172ef697d6f99ae4748d5f8a1fff3696170",
                "md5": "1e9a5a7de91467b7a01b0432774a0ae4",
                "sha256": "e19cd2ee27fb143f64435f2e5d6539d978765b06852bcbae5d04183eb59f6ec3"
            },
            "downloads": -1,
            "filename": "leetquery-0.2.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1e9a5a7de91467b7a01b0432774a0ae4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7.0",
            "size": 4774,
            "upload_time": "2023-08-11T01:31:49",
            "upload_time_iso_8601": "2023-08-11T01:31:49.508422Z",
            "url": "https://files.pythonhosted.org/packages/28/46/5f2a5f15ccb5d207fe363ec13172ef697d6f99ae4748d5f8a1fff3696170/leetquery-0.2.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "825540c69c5cf4481ee82170a9ea444566348fa63b2e39d3e16e6221b05c8145",
                "md5": "3f5f7c935d7bdac475a1745cf901b8f1",
                "sha256": "26ad03bae15a87d5c7159266671ab8492a14ccd894d04c25e69f4d4f26ff5ee7"
            },
            "downloads": -1,
            "filename": "leetquery-0.2.5.tar.gz",
            "has_sig": false,
            "md5_digest": "3f5f7c935d7bdac475a1745cf901b8f1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7.0",
            "size": 5186,
            "upload_time": "2023-08-11T01:31:50",
            "upload_time_iso_8601": "2023-08-11T01:31:50.522308Z",
            "url": "https://files.pythonhosted.org/packages/82/55/40c69c5cf4481ee82170a9ea444566348fa63b2e39d3e16e6221b05c8145/leetquery-0.2.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-11 01:31:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ShuYuHuang",
    "github_project": "leetquery",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        }
    ],
    "lcname": "leetquery"
}
        
Elapsed time: 0.21701s