# nackjicholson/aiosql

Simple SQL in Python

Repository: https://github.com/nackjicholson/aiosql
Canonical: https://ross.abutalabs.com/products/aiosql
Homepage: https://nackjicholson.github.io/aiosql
Language: Python
License: NOASSERTION
License Family: other
Last push: 2026-08-15T09:31:36+00:00

## Health v2 (maintenance only)
Score: 82/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 52, longevity 100
- inputs: {"age_days": 2831, "days_push": 18, "days_rel": 241, "gap_med": 34.5, "n_releases_24m": 11}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1409, forks 65 (observed 2026-08-28T04:04:38.687172+00:00)

## What it is
aiosql is a Python library that lets you write SQL queries in plain .sql files and load them into your application as callable methods, a port of Clojure's yesql. It supports both sync and asyncio drivers for SQLite, PostgreSQL, MySQL, DuckDB, and other PEP 249-compatible databases.

## Use cases
- load sql queries from files in python
- keep sql out of python string literals
- use asyncpg or aiosqlite with named queries
- version control sql alongside application code
- reuse sql files in psql and python
- yesql for python

## When to choose
- you want raw SQL as first-class code files instead of an ORM
- you use asyncio database drivers and want named query methods
- you want to run the same SQL in CLI tools and your Python app

## When to avoid
- you prefer an ORM with models and migrations
- you need dynamic query building rather than predefined statements
- your database driver lacks a PEP 249-compatible adapter

## Facets
- artifact type: library
- maturity: active
- function: database, database-driver, orm
- domain: databases, developer-tools, backend
- platform: python, cross-platform
- tags: sql, yesql, asyncio, sql-files, query-loading, pep-249

## Member repositories
- nackjicholson/aiosql (main) score 82

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:38.687172+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-30T04:38:33.062987+00:00, confidence not recorded.
  - readme: https://github.com/nackjicholson/aiosql (fetched 2026-08-28T04:04:38.687172+00:00, sha 4eec6cec5f6f)
  - homepage: https://nackjicholson.github.io/aiosql (fetched 2026-08-29T11:52:10.142036+00:00, sha c927c88acbaa)
  - registry_pypi: https://pypi.org/pypi/aiosql/json (fetched 2026-08-29T11:52:10.144586+00:00, sha dcefbe6fd203)
- Data as of 2026-08-30T08:39:29.467469+00:00.
