---
title: "cygnet: A small but fierce ORM"
url: https://daily.dev/posts/cygnet-a-small-but-fierce-orm-jfoyazuap
source_url: https://postgr.es/p/9nh
type: article
source: "Planet PostgreSQL"
published: 2026-06-24T15:03:25.347Z
updated: 2026-06-24T15:03:46.083Z
tags: ["python", "postgresql"]
reading_time: 4
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# cygnet: A small but fierce ORM

**[Planet PostgreSQL](https://daily.dev/sources/planet-postgresql)** · 4 min read · 0 upvotes · 0 comments

## Summary

Cygnet is a PostgreSQL-only async Python ORM that embraces SQL rather than hiding it. Its API uses uppercase method names for SQL keywords and lowercase for Python utilities, making queries readable and predictable. Key design choices include: no base class or metaclass inheritance, a plain dataclass model, an AST-based query builder that emits parameterized SQL in one pass, and strict safety rails (UPDATE/DELETE require explicit WHERE, typo'd field names raise errors). It natively supports PostgreSQL-specific features like JSONB, LATERAL joins, CTEs, window functions, ON CONFLICT upserts, RETURNING, FOR UPDATE SKIP LOCKED, and server-side cursor streaming. The library is driver-agnostic at its core, with psycopg3 as an optional extra, and requires Python 3.12+ and PostgreSQL 14+.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://postgr.es/p/9nh>

## Similar posts on daily.dev

- [PostgreSQL: Psycopg 3.3 released](https://daily.dev/posts/postgresql-psycopg-3-3-released-ewfhnirnz) · PostgreSQL · 1 upvotes · 0 comments
- [GitHub - mr-fatalyst/oxyde: Oxyde ORM is a type-safe, Pydantic-centric asynchronous ORM with a high-performance Rust core designed for clarity, speed, and reliability.](https://daily.dev/posts/github---mr-fatalyst-oxyde-oxyde-orm-is-a-type-safe-pydantic-centric-asynchronous-orm-with-a-high--gbdlmt2wk) · Hacker News · 2 upvotes · 0 comments
- [Tinybird, now Python-native too](https://daily.dev/posts/tinybird-now-python-native-too-tfeyjhzz2) · Tinybird · 15 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#postgresql](https://daily.dev/tags/postgresql)

[View this post on daily.dev](https://daily.dev/posts/cygnet-a-small-but-fierce-orm-jfoyazuap)
