# elixir-ecto/ecto

A toolkit for data mapping and language integrated query.

Repository: https://github.com/elixir-ecto/ecto
Canonical: https://ross.abutalabs.com/products/ecto
Homepage: https://hexdocs.pm/ecto
Language: Elixir
License: Apache-2.0
License Family: permissive
Last push: 2026-08-21T20:45:00+00:00

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

## Adoption (not part of the score)
Stars 6487, forks 1482 (observed 2026-08-28T04:09:43.777093+00:00)

## What it is
Ecto is a toolkit for data mapping and language-integrated queries in Elixir, providing schemas, changesets, and a composable query DSL. It is commonly paired with ecto_sql to work with databases like PostgreSQL and MySQL.

## Use cases
- map database rows to elixir structs
- write type-safe database queries in elixir
- validate and cast form data with changesets
- build a phoenix web app with database persistence
- query postgresql from elixir
- define database schemas in elixir

## When to choose
- you are building an Elixir application that needs database access or data validation
- you want a composable, functional query DSL instead of raw SQL strings
- you need to map external data sources into validated Elixir structs

## When to avoid
- your project is not written in Elixir or on the Erlang VM
- you need an ORM with active-record-style associations and migrations out of the box without the ecto_sql companion package
- you prefer raw SQL or a lightweight query builder for simple scripts

## Facets
- artifact type: library
- maturity: stable
- function: orm, database, database-driver, serialization, type-system
- domain: databases, backend, web-development, developer-tools
- platform: elixir, jvm, cross-platform
- tags: data-mapping, query-dsl, elixir, changesets, sql-adapters, schema-validation

## Member repositories
- elixir-ecto/ecto (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:43.777093+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-29T17:44:32.192644+00:00, confidence not recorded.
  - readme: https://github.com/elixir-ecto/ecto (fetched 2026-08-28T04:09:43.777093+00:00, sha cc2c6fd66f60)
  - homepage: https://hexdocs.pm/ecto (fetched 2026-08-29T08:41:09.406954+00:00, sha b9aa9e5ef4e3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
