odmantic icon indicating copy to clipboard operation
odmantic copied to clipboard

Sync and Async ODM (Object Document Mapper) for MongoDB based on python type hints

Results 176 odmantic issues
Sort by recently updated
recently updated
newest added

🐛 Fix using the shared session when updating a document Currently, the code creates a session and transaction and passes down the session in the parameters through all the function...

✨ Add new SyncEngine, support async and sync code - with fixed session This is the same as https://github.com/art049/odmantic/pull/225, but it includes the fixes to share the same session in...

✨ Upgrade types and add support for instance autocompletion with dataclass_transform (VS Code autocompletion). This is more or less the same as: https://github.com/art049/odmantic/pull/229, and this PR would superseded that one...

# Feature request ### Context Currently, it is suggested that we globally set the engine at the module level, and I suggest that this be removed from the documentation. Mongo...

enhancement

# ✨ Add new SyncEngine, support async and sync code Even the same models can be shared, a model can be retrieved by one engine and saved by the other,...

✨ Add support for dataclass_transform (VS Code autocompletion). This doesn't change the code at runtime, it doesn't affect how it works. It only implements the spec [PEP-0681](https://peps.python.org/pep-0681/) which enables editors...

# Bug Given a model definition like this: ``` class SubM(EmbeddedModel): count: int class M(Model): submodel: SubM model = M(submodel=SubM(count=1)) model_copy = model.copy(deep=True) ``` When I call `model_copy.submodel.count = 2`...

bug

Fixes https://github.com/art049/odmantic/issues/194

# Bug If i use the type `Optional[datetime.datetime]` in a class which extends `odmantic.model` the type is mapped to `typing.Optional[odmantic.bson._datetime]`. This is intended. But after the fist us of this...

bug