Skip to main content

Query and analyze data from leetcode

Project description

LeetQuery

PyPI version Test Downloads

A library for retriving Human Resource information from Leetcode.

Install

    pip install leetquery

Usage

Retrieving User Submissions

Just enter user name and limit of query!

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~~

from leetquery.problem import get_discription

submissions = get_discription(problemname="two-sum")

return value:

<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

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:

{
    'totalAccepted': '10.4M',
    'totalSubmission': '20.6M',
    ...
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

leetquery-0.2.5.tar.gz (5.2 kB view hashes)

Uploaded Source

Built Distribution

leetquery-0.2.5-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page