# ormar-orm/ormar

python async orm with fastapi in mind and pydantic validation

Repository: https://github.com/ormar-orm/ormar
Canonical: https://ross.abutalabs.com/products/ormar
Homepage: https://collerek.github.io/ormar/
Language: Python
License: MIT
License Family: permissive
Topics: orm, sqlalchemy, async-orm, python-orm, fastapi, pydantic, alembic, databases
Last push: 2026-08-25T02:30:40+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 87, longevity 100
- inputs: {"age_days": 2222, "days_push": 9, "days_rel": 86, "gap_med": 29, "n_releases_24m": 8}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1802, forks 97 (observed 2026-08-28T04:05:38.185023+00:00)

## What it is
Ormar is an async mini ORM for Python supporting Postgres, MySQL, and SQLite, built on SQLAlchemy Core with pydantic validation. It lets you maintain a single model that works directly as FastAPI request and response models.

## Use cases
- build async FastAPI apps with database models
- use one model for both ORM and pydantic validation
- query Postgres, MySQL, or SQLite asynchronously
- generate migrations with alembic
- avoid duplicating pydantic and ORM models

## When to choose
- you use FastAPI or Starlette and want a single model for validation and persistence
- you need a lightweight async ORM without maintaining separate schemas
- you want SQLAlchemy Core query building with pydantic-style models

## When to avoid
- you need the full SQLAlchemy ORM feature set like advanced relationship loading
- your project is synchronous-only
- you need databases beyond Postgres, MySQL, and SQLite

## Facets
- artifact type: library
- maturity: active
- function: orm, database, serialization, form-handling
- domain: databases, web-development, backend, apis
- platform: python, cross-platform
- tags: async, pydantic, fastapi, sqlalchemy-core, alembic, single-model

## Member repositories
- ormar-orm/ormar (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:38.185023+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:22:02.978401+00:00, confidence not recorded.
  - readme: https://github.com/ormar-orm/ormar (fetched 2026-08-28T04:05:38.185023+00:00, sha 0bc2bfaee2ba)
  - homepage: https://collerek.github.io/ormar/ (fetched 2026-08-29T11:00:55.321274+00:00, sha 998461ea62a0)
  - registry_pypi: https://pypi.org/pypi/ormar/json (fetched 2026-08-29T11:00:55.330088+00:00, sha d48e6ad920ea)
- Data as of 2026-08-30T08:39:29.467469+00:00.
