beanie icon indicating copy to clipboard operation
beanie copied to clipboard

Asynchronous Python ODM for MongoDB

Results 252 beanie issues
Sort by recently updated
recently updated
newest added

### model ``` class LocationDD(BaseModel): type: str = "Point" coordinates: list[float, float] class Drive(Document): id_user: PydanticObjectId ver: DriveType location: Indexed(LocationDD, index_type=pymongo.GEOSPHERE) body: str is_completed: bool = False ``` ### route...

# What doesn't work As per the documentation, only top level Links are fully supported in beanie. This means nested linking doesn't work properly. The following doesn't work: `A` and...

I have the following code: ``` class PlanetDocument(Document): created_at: datetime name: str = "Planet" class UserDocument(Document): id: Indexed(str) username: Optional[str] = None planets: List[PlanetDocument] = [] class Settings: name =...

Does beanie support multiple databases? I have an application that uses multiple databases to separate the data across clients, but it seems that I need to supply the database upon...

Hi, I love the library, but using it with pyright/pylance on strict is really hard due to missing types for a lot of arguments. e.g. Indexed is unknown on `typ`,...

Motor 3.0.0 was released a few days ago: https://www.mongodb.com/community/forums/t/mongodb-motor-3-0-0-released/160708. Do you plan to support the new version in the near future?

Hello, I have a questionable asynchronous call performances using Beanie. For this particular example, I do N calls of _get_payload_ using _asyncio.gather()_ ``` In [164]: async def get_payload(zone_id: int) ->...

When trying to use the Link type with FastAPI, the mappings from/to JSON fail and/or cause some serious problems. Consider this simple data structure: ````py class A(Document): name: str class...

```python class OutTestModel(BaseModel): id: Optional[PydanticObjectId] name:str class TestModel(Outtestmodel,Document): id:Optional[PydanticObjectId] secret_message:str @Router.get("/failtest",response_model=OutTestModel) async def wontwork(): mymodel = TestModel(name="jeff",secret_message="this is gonna break") await mymodel.save() return mymodel ``` The above code OutTestModel will...