> ## Documentation Index
> Fetch the complete documentation index at: https://leetcode-py.wisl.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> leetcode-py is a Python LeetCode practice environment generator with one CLI: lcpy. It is not a service or platform.
> Each problem is a directory under leetcode/ with README.md, solution.py, test_solution.py, helpers.py, and playground.ipynb. lcpy gen creates them from JSON templates bundled with the package.
> Examples are backed by tests; copy them verbatim.

# leetcode-py

> Modern Python LeetCode practice environment with automated problem generation, beautiful data structure visualizations, and comprehensive testing.

<img src="https://mintcdn.com/leetcode-py/VCrzlUI648LnF7Pk/img/brand/og-card-light.png?fit=max&auto=format&n=VCrzlUI648LnF7Pk&q=85&s=5ede1abdf7fbe3c26ac428cd22b4d1fe" className="sd-hero sd-hero-light" alt="leetcode-py: Modern Python LeetCode practice environment." width="1200" height="630" data-path="img/brand/og-card-light.png" />

<img src="https://mintcdn.com/leetcode-py/VCrzlUI648LnF7Pk/img/brand/og-card-dark.png?fit=max&auto=format&n=VCrzlUI648LnF7Pk&q=85&s=31c8b6b3d57afe6186af0404794a3674" className="sd-hero sd-hero-dark" alt="leetcode-py: Modern Python LeetCode practice environment." width="1200" height="630" data-path="img/brand/og-card-dark.png" />

<div className="not-prose sd-badges">
  <a href="https://github.com/wislertt/leetcode-py/actions/workflows/cd.yml">
    <img src="https://img.shields.io/github/actions/workflow/status/wislertt/leetcode-py/cd.yml?branch=main&label=tests&logo=github" alt="tests" />
  </a>

  <a href="https://codecov.io/gh/wislertt/leetcode-py">
    <img src="https://codecov.io/gh/wislertt/leetcode-py/graph/badge.svg" alt="codecov" />
  </a>

  <a href="https://pypi.org/project/leetcode-py-sdk/">
    <img src="https://img.shields.io/pypi/v/leetcode-py-sdk.svg?color=blue" alt="pypi" />
  </a>

  <a href="https://github.com/wislertt/leetcode-py/">
    <img src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue?logo=python" alt="python versions" />
  </a>
</div>

## Why leetcode-py?

* **Tests come with the problem**: every generated problem ships a
  parametrized pytest suite with 10+ cases. You never write test scaffolding;
  you only make red go green.
* **Data structures you can see**: `TreeNode`, `ListNode`, and `GraphNode`
  convert between LeetCode's array format and live objects, and render as
  diagrams in Jupyter or clean ASCII in the terminal.
* **300+ problems ready to generate**: Grind 75, Blind 75, NeetCode 150,
  NeetCode 250, and Algo Master 75 as reproducible JSON templates.

See the full pitch in [Why leetcode-py](/getting-started/why-leetcode-py).

## A taste

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
lcpy gen -n 1   # generate Two Sum: README, solution stub, 10+ parametrized tests
cd leetcode/two_sum
python -m pytest test_solution.py   # red -> implement solution.py -> green
```

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/getting-started/installation">
    Install the CLI from PyPI, or clone the repo for development.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/getting-started/quickstart">
    Generate your first problem, run its tests, and solve it.
  </Card>
</CardGroup>
