What's Changed
I'm excited to release version 1.0.0 of **PyODMongo.**
Although the library was built on top of Pydantic V2, from this release onwards the dependency on Pydantic is at a higher abstraction layer.
In the first versions of PyODMongo, to guarantee certain behaviors I had to rewrite the Pydantic metaclass, making some changes, I did the same thing with the Field function, this meant that with each Pydantic update I had to do countless tests to ensure that nothing broke .
In this new version of PyODMongo I created a new metaclass that inherits from the pydantic metaclass and adds certain behaviors, I followed the same reasoning with the Fields function.
Basically a lot of thing has been refactored to improve performance, code simplicity and a higher abstraction of Pydantic
**Refactor**
- All sync and async engine methods: `find_one`, `find_many`, `save`, `save_all` and `delete`
- There's no more `SaveResponse` or `DeleteResponse`, both have been replaced by `DbResponse`
- `DbModel` now inherits from Pydantic's `BaseModel` and the new `DbMeta` metaclass
**New features**
- `DbMeta` and `PyOdmongoMeta`
- `MainBaseModel` class to use in embedded documents
**Full Changelog**: https://github.com/mauro-andre/pyodmongo/compare/0.10.2...1.0.0