Contents

beanie 1.25.0

0

Asynchronous Python ODM for MongoDB

Asynchronous Python ODM for MongoDB

Stars: 1732, Watchers: 1732, Forks: 182, Open Issues: 76

The roman-right/beanie repo was created 3 years ago and the last code push was 2 days ago.
The project is very popular with an impressive 1732 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

Author
None
License
None
Homepage
None
PyPi:
https://pypi.org/project/beanie/
GitHub Repo:
https://github.com/roman-right/beanie

Classifiers

  • Database
  • Software Development/Libraries/Python Modules
No  beanie  pypi packages just yet.

Errors

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 76 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.110.0

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.9.3

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.

[pydantic] NameError: Field name "schema" shadows a BaseModel attribute; use a different field name with "alias='schema'".

This error is encountered when you define a pydantic class that has a attributed named schema. class EmbedDoc(BaseModel): schema: int = 1 name: str = Field(str) tags: List[str] archived: bool The schema attribute is special field for pydantic……. Workaround You can specify a field alias and when the document is serialized it will use the field name schama instead of schema_. class EmbedDoc(BaseModel): schema_: int = Field(1, alias="schema") name: str = Field(str) tags: List[str] archived: bool

sniffio 1.3.1

Sniff out which async library your code is running under