beanie 1.20.0


Asynchronous Python ODM for MongoDB

Asynchronous Python ODM for MongoDB

Stars: 1352, Watchers: 1352, Forks: 128, Open Issues: 34

The roman-right/beanie repo was created 2 years ago and the last code push was 16 hours ago.
The project is very popular with an impressive 1352 github stars!

How to Install beanie

You can install beanie using pip

pip install beanie

or add it to a project with poetry

poetry add beanie

Package Details

GitHub Repo:


No  beanie  pypi packages just yet.


A list of common beanie errors.

Code Examples

Here are some beanie code examples and snippets.

  • beanie code example from docs

    The following beanie code example shows how the library works by first defining two pydantic classes and then save a record to the database and retreiving a record. beanie utilizes pydantic and `motor`` to provide an asyncronys ODM for mongodb.

GitHub Issues

The beanie package has 34 open issues on GitHub

  • Replacing Get Database for AsyncIOMotorClient
  • Pytest Reccomendations
  • Validation error when getting the doc and it's linked document is deleted.
  • Cannot import local packages in the migration modules
  • Please issue a Changelog with releases
  • Can't replace a dict attribute with save_changes
  • Support for MongoDB Views
  • Add ignore cache in query
  • [Query] Pydantic Validation throws error even while fetching data from db
  • Add support for synchronous operations
  • Using transactions in order to ensure data consistency
  • Avoid race condition
  • Query linked fields
  • Suggestion for dynamic projections
  • Support for tailable cursors

See more issues on GitHub

Related Packages & Articles

fastapi 0.100.1

FastAPI framework, high performance, easy to learn, fast to code, ready for production

aredis 1.1.8

Python async client for Redis key-value store

aiohttp 3.8.5

The aiohttp Python package is an asynchronous HTTP client/server framework that leverages Python's asyncio library. It supports both client and server sides of the HTTP protocol, as well as client and server websockets. The package provides a web server with middleware support and pluggable routing. This makes it a powerful tool for building efficient, non-blocking web applications in Python. It is highly recommended for projects where concurrent network or HTTP requests are a core requirement, and it is often used in web scraping, API consumption, and web development.

sniffio 1.3.0

Sniff out which async library your code is running under