Skip to main content

tests release Quality Gate Status Security Rating Vulnerabilities codecov pypi downloads python Star ⭐ Sponsor 💖

leetcode-py logo

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 lcpy command

🚀 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

307 problems, ready to generate, across six complete collections. Browse them all in the 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
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

💖 Support This Project

If you find this project helpful, please consider starring the repo ⭐ or sponsoring my work 💖.

Star ⭐ Sponsor 💖

License

Apache-2.0. See LICENSE.

Release files for leetcode-py-sdk 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for leetcode-py-sdk 1.0.4
File Size Uploaded
leetcode_py_sdk-1.0.4.tar.gz 252.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for leetcode-py-sdk 1.0.4
File Interpreter ABI Platform
leetcode_py_sdk-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 796.5 kB

Release files / leetcode_py_sdk-1.0.4.tar.gz

Download URL leetcode_py_sdk-1.0.4.tar.gz
Size 252.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2511b25696ae817b296ca798cc2f5b321b6a61e5438cf3db1efcec43b5ddc154
BLAKE2b-256 checksum
How to use checksums
70b6e0f3a4da69e22025321f19cd8ae0285719102ef0697e06c157be588fd3e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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.4-py3-none-any.whl

Download URL leetcode_py_sdk-1.0.4-py3-none-any.whl
Size 543.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
757bdf7c71225e56d90bbe2f90ebf0154f87a927b969e8fb9e6819ff99151a25
BLAKE2b-256 checksum
How to use checksums
bdae7b3a4c1967af8d93fd45ddb825633d2f45924bb6d7286471755303a541e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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 history Release notifications | RSS feed

1.0.13

2 release files

1.0.12

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.46.0

2 release files

0.45.0

2 release files

0.44.0

2 release files

0.43.7

2 release files

0.43.6

2 release files

0.43.5

2 release files

0.43.4

2 release files

0.43.1

2 release files

0.43.0

2 release files

0.42.3

2 release files

0.40.0

2 release files

0.39.3

2 release files

0.39.2

2 release files

0.39.1

2 release files

0.39.0

2 release files

0.36.8

2 release files

0.36.7

2 release files

0.36.6

2 release files

0.36.5

2 release files

0.36.3

2 release files

0.36.2

2 release files

0.36.1

2 release files

0.36.0

2 release files

0.35.4

2 release files

0.35.3

2 release files

0.35.2

2 release files

0.35.1

2 release files

0.30.1

2 release files

0.30.0

2 release files

0.29.1

2 release files

0.29.0

2 release files

0.28.0

2 release files

0.27.2

2 release files

0.27.1

2 release files

0.27.0

2 release files

0.26.1

2 release files

0.26.0

2 release files

0.25.0

2 release files

0.24.0

2 release files

0.23.2

2 release files

0.23.1

2 release files

0.23.0

2 release files

0.22.3

2 release files

0.22.2

2 release files

0.22.1

2 release files

0.22.0

2 release files

0.21.0

2 release files

0.20.3

2 release files

0.20.2

2 release files

0.20.1

2 release files

0.20.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page