SkillsPicker

Home / Guides

Cursor rules for Python

Short answer: a Cursor rule is a .mdc file in .cursor/rules/ that tells Cursor how to write code for your project. Start with one general Python rule, then add rules for the libraries you use. Our database holds 130 open-license Cursor rules tagged Python. These 5 cover the common cases.

Want picks for your own repo? Scan your project free. You see the match count and 2 picks. The full list is $9 once, up to 30 ranked picks for that scan.

5 Cursor rules for Python

Rule Repo License What it covers Install
python sanjeed5/awesome-cursor-rules-mdc CC0-1.0 General Python practices: readability, structure, modern tooling curl -fsSL --create-dirs -o .cursor/rules/python.mdc https://raw.githubusercontent.com/sanjeed5/awesome-cursor-rules-mdc/HEAD/rules-mdc/python.mdc
fastapi sanjeed5/awesome-cursor-rules-mdc CC0-1.0 FastAPI apps curl -fsSL --create-dirs -o .cursor/rules/fastapi.mdc https://raw.githubusercontent.com/sanjeed5/awesome-cursor-rules-mdc/HEAD/rules-mdc/fastapi.mdc
django sanjeed5/awesome-cursor-rules-mdc CC0-1.0 Django projects curl -fsSL --create-dirs -o .cursor/rules/django.mdc https://raw.githubusercontent.com/sanjeed5/awesome-cursor-rules-mdc/HEAD/rules-mdc/django.mdc
pytest sanjeed5/awesome-cursor-rules-mdc CC0-1.0 Tests with pytest curl -fsSL --create-dirs -o .cursor/rules/pytest.mdc https://raw.githubusercontent.com/sanjeed5/awesome-cursor-rules-mdc/HEAD/rules-mdc/pytest.mdc
pydantic sanjeed5/awesome-cursor-rules-mdc CC0-1.0 Pydantic v2 models curl -fsSL --create-dirs -o .cursor/rules/pydantic.mdc https://raw.githubusercontent.com/sanjeed5/awesome-cursor-rules-mdc/HEAD/rules-mdc/pydantic.mdc

Each install line downloads one .mdc file into .cursor/rules/ in your repo, where Cursor reads project rules (Cursor rules docs). Open the file and trim what does not fit your project before you commit it.

How to pick rules

Our database has more Python rules for SQLAlchemy, Poetry, mypy, flake8, pylint, Typer, httpx and data libraries. A scan of your repo picks the ones you use.

For Claude Code skills on the same stack, see the Python guide and the Python skills page. For FastAPI and Django skills, see FastAPI and Django.

FAQ

Where do Cursor rules go? In .cursor/rules/ at the root of your repo, as .mdc files. Cursor reads them for that project. Commit the folder so your team gets the same rules.

Should I use .cursorrules or .cursor/rules? Cursor's docs describe project rules as .mdc files in .cursor/rules/. The install lines above use that folder.

Do Cursor rules work in Claude Code? Not as is. Claude Code reads SKILL.md skills and CLAUDE.md. Our scan finds both Cursor rules and skills for your repo.

Are these rules free? Yes. Each one shows its license in the table.

Checked 2026-10-24. Prices and policies change. Confirm on the source before you buy.

Sources

More guides