Name | motorhead JSON |
Version |
0.2411.2
JSON |
| download |
home_page | None |
Summary | Async MongoDB with vanilla Pydantic v2+ - made easy. |
upload_time | 2024-11-17 17:32:13 |
maintainer | None |
docs_url | None |
author | Peter Volf |
requires_python | <4.0,>=3.10 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
![Tests](https://github.com/volfpeter/motorhead/actions/workflows/tests.yml/badge.svg)
![Linters](https://github.com/volfpeter/motorhead/actions/workflows/linters.yml/badge.svg)
![Documentation](https://github.com/volfpeter/motorhead/actions/workflows/build-docs.yml/badge.svg)
![PyPI package](https://img.shields.io/pypi/v/motorhead?color=%2334D058&label=PyPI%20Package)
**Source code**: [https://github.com/volfpeter/motorhead](https://github.com/volfpeter/motorhead)
**Documentation and examples**: [https://volfpeter.github.io/motorhead](https://volfpeter.github.io/motorhead/)
# Motorhead
Async MongoDB with vanilla Pydantic v2+ - made easy.
Key features:
- Database **model** and API design with vanilla `Pydantic` v2+.
- Relationship support and validation using async **validators and delete rules** with a declarative, decorator-based syntax.
- ODM-like **query builder** for convenient, typed, and Pythonic query construction.
- Declarative **index** specification.
- Typed **utilities** for convenient model and API creation.
- Ready to use, customizable **async service layer** with **transaction support** that integrates all the above to keep your API and business logic clean, flexible, and easy to understand.
- **Simplicity**: by not being a classic ODM, the codebase is very simple and easy to understand (even contribute to) even for relative beginners.
By providing a convenient, declarative middle layer between MongoDB and your API, `motorhead` is halfway between an object document mapper (based on vanilla `Pydantic`) and a database driver (by wrapping the official, async `motor` driver). What's missing is the built-in ODM performance and memory overhead, whose benefits are rarely felt when working with document databases.
See the [full documentation here](https://volfpeter.github.io/motorhead/).
## Installation
The library is available on PyPI and can be installed with:
```console
$ pip install motorhead
```
## Examples
See the [documentation](https://volfpeter.github.io/motorhead/fastapi-example/) for usage and application examples.
## Requirements
The project depends on `motor` (the official asyncio MongoDB driver, which is built on top of `pymongo` and `bson`) and `pydantic` v2+.
## Development
Use `black` for code formatting, `mypy` for static code analysis, `ruff` for linting, and `pytest` (with `pytest-asyncio` and `pytest-docker`) for testing.
The documentation is built with `mkdocs-material` and `mkdocstrings`.
## Contributing
All contributions are welcome.
## Notes
This project is the continuation of [fastapi-motor-oil](https://github.com/volfpeter/fastapi-motor-oil) with support for [Pydantic v2](https://docs.pydantic.dev/latest/migration/), among other improvements. Migration from `fastapi-motor-oil` should be easy, but if you need help, just create an issue in the issue tracker.
## License - MIT
The library is open-sourced under the conditions of the [MIT license](https://choosealicense.com/licenses/mit/).
Raw data
{
"_id": null,
"home_page": null,
"name": "motorhead",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Peter Volf",
"author_email": "do.volfp@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/3f/0b/ba65e790d7d8d2a653d1d2ac4f9e9edcfcbb4e6811e7bafe1a4d43915ff2/motorhead-0.2411.2.tar.gz",
"platform": null,
"description": "![Tests](https://github.com/volfpeter/motorhead/actions/workflows/tests.yml/badge.svg)\n![Linters](https://github.com/volfpeter/motorhead/actions/workflows/linters.yml/badge.svg)\n![Documentation](https://github.com/volfpeter/motorhead/actions/workflows/build-docs.yml/badge.svg)\n![PyPI package](https://img.shields.io/pypi/v/motorhead?color=%2334D058&label=PyPI%20Package)\n\n**Source code**: [https://github.com/volfpeter/motorhead](https://github.com/volfpeter/motorhead)\n\n**Documentation and examples**: [https://volfpeter.github.io/motorhead](https://volfpeter.github.io/motorhead/)\n\n# Motorhead\n\nAsync MongoDB with vanilla Pydantic v2+ - made easy.\n\nKey features:\n\n- Database **model** and API design with vanilla `Pydantic` v2+.\n- Relationship support and validation using async **validators and delete rules** with a declarative, decorator-based syntax.\n- ODM-like **query builder** for convenient, typed, and Pythonic query construction.\n- Declarative **index** specification.\n- Typed **utilities** for convenient model and API creation.\n- Ready to use, customizable **async service layer** with **transaction support** that integrates all the above to keep your API and business logic clean, flexible, and easy to understand.\n- **Simplicity**: by not being a classic ODM, the codebase is very simple and easy to understand (even contribute to) even for relative beginners.\n\nBy providing a convenient, declarative middle layer between MongoDB and your API, `motorhead` is halfway between an object document mapper (based on vanilla `Pydantic`) and a database driver (by wrapping the official, async `motor` driver). What's missing is the built-in ODM performance and memory overhead, whose benefits are rarely felt when working with document databases.\n\nSee the [full documentation here](https://volfpeter.github.io/motorhead/).\n\n## Installation\n\nThe library is available on PyPI and can be installed with:\n\n```console\n$ pip install motorhead\n```\n\n## Examples\n\nSee the [documentation](https://volfpeter.github.io/motorhead/fastapi-example/) for usage and application examples.\n\n## Requirements\n\nThe project depends on `motor` (the official asyncio MongoDB driver, which is built on top of `pymongo` and `bson`) and `pydantic` v2+.\n\n## Development\n\nUse `black` for code formatting, `mypy` for static code analysis, `ruff` for linting, and `pytest` (with `pytest-asyncio` and `pytest-docker`) for testing.\n\nThe documentation is built with `mkdocs-material` and `mkdocstrings`.\n\n## Contributing\n\nAll contributions are welcome.\n\n## Notes\n\nThis project is the continuation of [fastapi-motor-oil](https://github.com/volfpeter/fastapi-motor-oil) with support for [Pydantic v2](https://docs.pydantic.dev/latest/migration/), among other improvements. Migration from `fastapi-motor-oil` should be easy, but if you need help, just create an issue in the issue tracker.\n\n## License - MIT\n\nThe library is open-sourced under the conditions of the [MIT license](https://choosealicense.com/licenses/mit/).\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Async MongoDB with vanilla Pydantic v2+ - made easy.",
"version": "0.2411.2",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b282a046a25278449be55c856845762df838aeccd089a942132cef1339ce0ded",
"md5": "e259b43df2afaf873a3401586cf5ac40",
"sha256": "ddb7bffa53663d734745880e456d622de390644e717aa354582cefe9ce8d679f"
},
"downloads": -1,
"filename": "motorhead-0.2411.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e259b43df2afaf873a3401586cf5ac40",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 20454,
"upload_time": "2024-11-17T17:32:11",
"upload_time_iso_8601": "2024-11-17T17:32:11.468873Z",
"url": "https://files.pythonhosted.org/packages/b2/82/a046a25278449be55c856845762df838aeccd089a942132cef1339ce0ded/motorhead-0.2411.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3f0bba65e790d7d8d2a653d1d2ac4f9e9edcfcbb4e6811e7bafe1a4d43915ff2",
"md5": "dceb050c6535514265fb65fab6a40007",
"sha256": "4286de3d5200da830a3545430ec980585e7da9a85e599ccf457ffa3b89485bf6"
},
"downloads": -1,
"filename": "motorhead-0.2411.2.tar.gz",
"has_sig": false,
"md5_digest": "dceb050c6535514265fb65fab6a40007",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 18171,
"upload_time": "2024-11-17T17:32:13",
"upload_time_iso_8601": "2024-11-17T17:32:13.362139Z",
"url": "https://files.pythonhosted.org/packages/3f/0b/ba65e790d7d8d2a653d1d2ac4f9e9edcfcbb4e6811e7bafe1a4d43915ff2/motorhead-0.2411.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-17 17:32:13",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "motorhead"
}