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

1164 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.7

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.7
File Size Uploaded
leetcode_py_sdk-1.0.7.tar.gz 1.0 MB Details

Built distribution (wheel)

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

Total release size: 3.1 MB

Release files / leetcode_py_sdk-1.0.7.tar.gz

Download URL leetcode_py_sdk-1.0.7.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
1e7592ea245fdd50bc2ebbe6cc589fbfdf889b227228a2c4fa90869107f94ad1
BLAKE2b-256 checksum
How to use checksums
95e69125e8c121508b0736d13ce8b623e1f6f2c115d32a5ed1bc03120c8665d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","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.7-py3-none-any.whl

Download URL leetcode_py_sdk-1.0.7-py3-none-any.whl
Size 2.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
1642bb6dd4181b4ab3a5b693bf96bd46ca57ff43fd88ee9e04624d4e8e424fe6
BLAKE2b-256 checksum
How to use checksums
2a2fb956583e8dcad87e75f369638b8610d5c300153c0533f7048307ac587e9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","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

This release

1.0.7 This release

2 release files

1.0.6

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