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

1404 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.10

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.10
File Size Uploaded
leetcode_py_sdk-1.0.10.tar.gz 1.2 MB Details

Built distribution (wheel)

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

Total release size: 3.7 MB

Release files / leetcode_py_sdk-1.0.10.tar.gz

Download URL leetcode_py_sdk-1.0.10.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
cea390a11358dd082587ef6059cb64232aaad5f4a6e219e8d8b5083efdbd1b65
BLAKE2b-256 checksum
How to use checksums
510e813d3cbfd54a0e965900ded0695bb912ca6efe313d4373d5dec72d46d200
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","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.10-py3-none-any.whl

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

This release

1.0.10 This release

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

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