#283283rd of 358 in Backends, databases and hosting
beanie
Async Python ODM for MongoDB with Pydantic models
- Stars
- 2.7k
- License
- Apache-2.0
- Last commit
- Oct 2026
- Last release
- Aug 2026
- Language
- Python
2,639 on 26 Apr 20262,712 on 22 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
Beanie maps MongoDB collections to Pydantic-based Document classes and exposes async insert, find, update and delete using Python expression syntax. It uses the PyMongo async client under the hood and includes data and schema migrations. A synchronous sibling, Bunnet, exists for non-async code.
Who it is for: Python developers using MongoDB with FastAPI or other async apps
Strengths
- Queries written as Python expressions, e.g. Product.price < 10
- Pydantic models double as document schemas; Indexed fields declare indexes
- Data and schema migrations are built in
- Linked examples cover FastAPI, JWT auth and Azure Cosmos DB
Weaknesses
- MongoDB only; no support for other databases
- Maintainers warn reviews and issue replies are slower while v3 is built
- Async only; sync use needs the separate Bunnet library
- Library, not a service: no hosting, auth or API layer included
What it needs
- no GPU
- Needs MongoDB, Pydantic, PyMongo
What changed
From the release notes. No flag means the note does not say so, not that the upgrade is safe.
Known problems
Reported, then fixed by a linked change
- [BUG] update() raises a `RevisionIdWasChanged` when expecting a `DuplicateKeyError` ↗ (opens in a new tab)4 reactions · closed 9 Mar 2026Fixed by Fix update() raising RevisionIdWasChanged for non-revision DuplicateKeyError ↗ (opens in a new tab)
- [BUG] Inconsistent `before_event` trigger behavior ↗ (opens in a new tab)3 reactions · closed 21 Mar 2026Fixed by Fix before_event changes not persisted to DB ↗ (opens in a new tab)
- [BUG] Frozen fields not supported (Pydantic 2) - exception thrown on `.save()` ↗ (opens in a new tab)3 reactions · closed 21 Mar 2026Fixed by fix: support frozen fields on save() and replace() (#863) ↗ (opens in a new tab)
- [BUG] Backlinks are not populated ↗ (opens in a new tab)2 reactions · closed 21 Mar 2026Fixed by fix: handle BackLink types in fetch_link and fetch_all_links ↗ (opens in a new tab)
- [BUG] Logical operators are not type compliant when using bool operations ↗ (opens in a new tab)0 reactions · closed 7 Aug 2026Fixed by fix: wrap single bool expression in LogicalOperatorForListOfExpressions.query ↗ (opens in a new tab)
Titles are the reporters' own words, taken from the project's GitHub issues and ranked by reactions. We have not tried to reproduce any of them.
Also in Backends, databases and hosting
See all 358| Rank | Project | Score |
|---|---|---|
| #281 | im-serverSelf-hosted instant messaging server in Go over Protobuf and WebSocket | 57 out of 100 |
| #282 | spring-boot-starterSpring Boot auto-configuration and starters for the MyBatis SQL mapper | 56 out of 100 |
| #284 | agensgraphPostgreSQL fork with a built-in property graph queried via SQL, openCypher and GQL | 56 out of 100 |
| #285 | robustmqRust message broker for MQTT, Kafka, NATS and AMQP on shared storage | 55 out of 100 |
| #286 | go-springSpring Boot-style dependency injection and starter framework for Go services | 55 out of 100 |