leetcode-py
A Python package to generate professional LeetCode practice environments: a problem README, a typed solution stub, a parametrized pytest suite with 10+ cases, helpers, and a playground notebook, all from JSON templates. Full documentation lives at leetcode-py.wisl.dev.
What makes this different:
- 🤖 LLM-Assisted Workflow: Generate new problems instantly with AI assistance
- 🎨 Visual Debugging: TreeNode, ListNode, and GraphNode render as Graphviz diagrams in Jupyter and clean ASCII in the terminal
- 🧪 Production Testing: Comprehensive test suites with edge cases and reproducibility verification
- 🚀 Modern Python: PEP 585/604 type hints, uv, and professional tooling
- 📊 Quality Assurance: 95%+ test coverage, security scanning, automated linting
- ⚡ Powerful CLI: Generate problems anywhere with
lcpycommand
🚀 Quick Start
Requires Python 3.10+ and Graphviz for visualizations (install guide).
# Install the package
pip install leetcode-py-sdk
# Generate problems anywhere
lcpy gen -n 1 # Generate Two Sum
lcpy gen -t grind-75 # Generate all Grind 75 problems
lcpy list -t blind-75 # List Blind 75 problems
# Start practicing
cd leetcode/two_sum
python -m pytest test_solution.py # Run tests
# Edit solution.py, then rerun tests
See the Quickstart for the full walkthrough and the CLI guide for every option.
🗂️ Collections
1405 problems, ready to generate, across seven complete collections. Browse them all in the [catalog](https://leetcode-py.wisl.dev/catalog):| Collection | What it is |
|---|---|
| Grind 75 | Essential coding interview questions, time-boxed study plan |
| Grind | 169 problems; Grind 75 plus the extended edition |
| Blind 75 | The original curated list |
| NeetCode 150 | Comprehensive coverage by topic |
| NeetCode 250 | NeetCode 150 plus 100 more |
| NeetCode All | The complete neetcode.io list; coverage still growing |
| AlgoMaster 75 | Curated algorithmic mastery problems |
🛠️ Development
git clone https://github.com/wislertt/leetcode-py.git
cd leetcode-py
uv sync
bake test
Problems in leetcode/ are generated from JSON templates. To add one, use the LLM-assisted workflow; for repo tasks see the bakefile guide.
📖 Documentation
- Why leetcode-py
- Installation
- Problem anatomy
- Testing pattern
- Visualizations
- Notebook workflow
- CLI reference
- Contributing
💖 Support This Project
If you find this project helpful, please consider starring the repo ⭐ or sponsoring my work 💖.
License
Apache-2.0. See LICENSE.
Metadata
Release files for leetcode-py-sdk 1.0.15
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 |
|---|---|---|---|---|
| leetcode_py_sdk-1.0.15.tar.gz | 1.3 MB | Without provenance | Details for leetcode_py_sdk-1.0.15.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| leetcode_py_sdk-1.0.15-py3-none-any.whl | Python 3 | none | any | Details for leetcode_py_sdk-1.0.15-py3-none-any.whl |
Total release size: 3.8 MB
Release files / leetcode_py_sdk-1.0.15.tar.gz
| Download URL | leetcode_py_sdk-1.0.15.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b54bb16661e876f4331313fd09157fd456381db453fef268bd28bcca3a25a911
|
|
BLAKE2b-256 checksum How to use checksums |
a5a71333552ecc2a37faff4668005bef154b66aae1fc7148c528ed730f2c9a1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / leetcode_py_sdk-1.0.15-py3-none-any.whl
| Download URL | leetcode_py_sdk-1.0.15-py3-none-any.whl |
|---|---|
| Size | 2.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08a6678429bca5653d4dafb09699c7a7faaff4ec88a59212b8c666a9360278cb
|
|
BLAKE2b-256 checksum How to use checksums |
285f6a4c4955cd00c688b27df343dd431db8491c2e31aeb51bc365f726cd451b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for leetcode-py-sdk 1.0.15
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.