# quantifiedcode/python-anti-patterns

An open collection of Python anti-patterns and worst practices.

Repository: https://github.com/quantifiedcode/python-anti-patterns
Canonical: https://ross.abutalabs.com/products/python-anti-patterns
Homepage: https://quantifiedcode.github.io/python-anti-patterns
Language: HTML
License: NOASSERTION
License Family: other
Last push: 2021-08-04T20:49:19+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4422, "days_push": 1855, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1733, forks 251 (observed 2026-08-28T04:05:28.927931+00:00)

## What it is
An open-source book, 'The Little Book of Python Anti-Patterns', cataloging Python anti-patterns and worst practices with examples and solutions. It covers correctness, maintainability, readability, performance, security, and migration patterns for Python and frameworks like Django.

## Use cases
- learn common Python mistakes to avoid
- improve code quality by studying worst practices
- find anti-patterns in Django projects
- teach Python best practices in a course
- reference anti-patterns while doing code review
- migrate legacy Python code to modern idioms

## When to choose
- you want a free, example-driven reference of Python pitfalls
- you are teaching Python and want concrete bad-vs-good code examples
- you need guidance on migrating old Python or Django patterns

## When to avoid
- you need a static analysis tool rather than reading material
- you need up-to-date coverage of modern Python 3.12+ idioms, as the book is no longer actively updated
- you need commercial-use rights, since content is CC BY-NC-SA licensed

## Facets
- artifact type: learning-resource
- maturity: maintenance
- function: documentation, developer-tools
- domain: tutorials, developer-tools, education
- platform: python, cross-platform
- tags: python-anti-patterns, best-practices, code-quality, open-book, django, creative-commons, python

## Member repositories
- quantifiedcode/python-anti-patterns (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:28.927931+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:31:27.941677+00:00, confidence not recorded.
  - readme: https://github.com/quantifiedcode/python-anti-patterns (fetched 2026-08-28T04:05:28.927931+00:00, sha 60495fc7105f)
  - homepage: https://quantifiedcode.github.io/python-anti-patterns (fetched 2026-08-29T11:08:11.095971+00:00, sha 2857b1d2e220)
- Data as of 2026-08-30T08:39:29.467469+00:00.
