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

531 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

💖 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.6

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.6
File Size Uploaded
leetcode_py_sdk-1.0.6.tar.gz 421.3 kB Details

Built distribution (wheel)

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

Total release size: 1.3 MB

Release files / leetcode_py_sdk-1.0.6.tar.gz

Download URL leetcode_py_sdk-1.0.6.tar.gz
Size 421.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5efdb97f1e722bd4b5288a6643021f9149abfadaa3d49e4646ead4e0444e399b
BLAKE2b-256 checksum
How to use checksums
ee89df9c2633fde74ed83be21ccbb51078a56501183e03892840958e44591976
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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.6-py3-none-any.whl

Download URL leetcode_py_sdk-1.0.6-py3-none-any.whl
Size 911.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac4cb3164a58f5fb8c6bf5d1ef4a083d60b3667b13b1a6367dddca4ec6e7cdfb
BLAKE2b-256 checksum
How to use checksums
200373bc7316f33552b748872f921022b1a5d4556261c24b431eb109339960d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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

This release

1.0.6 This release

2 release files

1.0.5

2 release files

1.0.4

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