Leetcode CLI
Get your Leetcode account into the terminal. Search for problems, solve them and submit.
Installation
Windows
pip install pyleetcode-cli
Linux
sudo pip install pyleetcode-cli
Configuration
For this software to work you need to be logged into your Leetcode account. Your Leetcode session_id (can be found in cookies) is required for client initialization.
Chrome / Edge
chrome://settings/cookies/detail?site=leetcode.com
After you get your session_id you can either paste it into the right place in config.yaml file or use the CLI for the configuration:
leet config session_id YOUR_SESSION_ID
Usage
Leet CLI
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
Commands:
{config,stats,list,problem,today,submission,submit,check}
config Configure the CLI
stats Display statistics
list Display problem list
problem Display problem
today Display today's problem.
submission Download submission code
submit Submit code answer
check Check code answer on example test
Example workflow
You can search for the problem in multiple ways: using lists, fetching question of the day, random question or using specific ID.
Take problem 1, show its contents in the terminal and create a file with the code snippet:
leet problem 1 -fc
Now try to solve the problem. After that you can check the code against example test case:
leet test <filename>
Then try to submit the solution and wait for the response:
leet submit <filename>
Metadata
Release files for pyleetcode-cli 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyleetcode-cli-0.2.0.tar.gz | 23.2 kB | Without provenance | Details for pyleetcode-cli-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyleetcode_cli-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for pyleetcode_cli-0.2.0-py3-none-any.whl |
Total release size: 56.9 kB
Release files / pyleetcode-cli-0.2.0.tar.gz
| Download URL | pyleetcode-cli-0.2.0.tar.gz |
|---|---|
| Size | 23.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
353c9ac312e162baaf059633a7fe82eb12b928f24320f457177f53ae30b0bf10
|
|
BLAKE2b-256 checksum How to use checksums |
7f9c90909f8175bd8567cc6da316cea0eb601b39b38cf5b2053430c1b7f75a48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / pyleetcode_cli-0.2.0-py3-none-any.whl
| Download URL | pyleetcode_cli-0.2.0-py3-none-any.whl |
|---|---|
| Size | 33.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7900523cef4e316c84716e2b5bc72c8870fd5c6556d1596885abf590b6f9823
|
|
BLAKE2b-256 checksum How to use checksums |
671052b1d1f948eee337a17a04793d43cf2591ead1eb39baaa2b37db24468b01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for pyleetcode-cli 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.