# ponyorm/pony

Pony Object Relational Mapper

Repository: https://github.com/ponyorm/pony
Canonical: https://ross.abutalabs.com/products/pony
Language: Python
License: Apache-2.0
License Family: permissive
Topics: python, python3, orm, postgresql, sqlite, mysql, cockroach, cockroachdb, oracle
Last push: 2026-08-10T12:37:32+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 64, longevity 100
- inputs: {"age_days": 4954, "days_push": 23, "days_rel": 24, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3819, forks 256 (observed 2026-08-28T04:08:21.066882+00:00)

## What it is
Pony is a Python object-relational mapper that lets developers write database queries using Python generator expressions and lambdas, which it translates into SQL via AST analysis. It supports SQLite, MySQL, PostgreSQL, Oracle, and CockroachDB with a concise, Pythonic API.

## Use cases
- query a database using python generator expressions instead of raw sql
- map python classes to database tables with compact entity definitions
- build a python backend app with sqlite or postgresql
- prototype database schemas with an entity-relationship diagram editor
- get readable generated sql and precise error messages during development

## When to choose
- you want a lightweight, easy-to-learn Python ORM with a distinctive query syntax
- your project uses SQLite, MySQL, PostgreSQL, Oracle, or CockroachDB
- you prefer writing queries as Python expressions over string-based SQL or query builders

## When to avoid
- you need an ORM with a large ecosystem, async-first design, or extensive third-party tooling
- you require databases not supported by Pony, such as SQL Server or MongoDB
- your team prefers mainstream ORMs like SQLAlchemy or Django ORM for hiring and community support

## Facets
- artifact type: library
- maturity: active
- function: orm, database
- domain: databases, web-development, backend, developer-tools
- platform: python, cross-platform
- tags: python-orm, generator-expressions, sql-generation, sqlite, postgresql, mysql, oracle, cockroachdb

## Member repositories
- ponyorm/pony (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:21.066882+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-29T18:26:29.196099+00:00, confidence not recorded.
  - readme: https://github.com/ponyorm/pony (fetched 2026-08-28T04:08:21.066882+00:00, sha eec5d1387e73)
  - registry_pypi: https://pypi.org/pypi/pony/json (fetched 2026-08-29T09:21:24.542394+00:00, sha b109fd0039eb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
