{"id":14979084,"url":"https://github.com/volfpeter/motorhead","last_synced_at":"2025-10-28T14:30:49.120Z","repository":{"id":184738460,"uuid":"672392539","full_name":"volfpeter/motorhead","owner":"volfpeter","description":"Async MongoDB with vanilla Pydantic v2+ - made easy.","archived":false,"fork":false,"pushed_at":"2024-08-06T08:48:05.000Z","size":874,"stargazers_count":11,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-29T02:21:52.607Z","etag":null,"topics":["api","async","fastapi","mongodb","odm","pydantic","python","query-builder","rest","typed"],"latest_commit_sha":null,"homepage":"https://volfpeter.github.io/motorhead/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/volfpeter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-29T23:31:42.000Z","updated_at":"2024-08-06T08:45:52.000Z","dependencies_parsed_at":"2023-07-30T00:37:01.544Z","dependency_job_id":"f30b6e63-3f50-407e-bd2f-d18a341f0715","html_url":"https://github.com/volfpeter/motorhead","commit_stats":{"total_commits":50,"total_committers":1,"mean_commits":50.0,"dds":0.0,"last_synced_commit":"d304533e276ceb40a3903266ab3a803e6ca73273"},"previous_names":["volfpeter/motorhead"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volfpeter%2Fmotorhead","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volfpeter%2Fmotorhead/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volfpeter%2Fmotorhead/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volfpeter%2Fmotorhead/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/volfpeter","download_url":"https://codeload.github.com/volfpeter/motorhead/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219859520,"owners_count":16556036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","async","fastapi","mongodb","odm","pydantic","python","query-builder","rest","typed"],"created_at":"2024-09-24T13:59:12.220Z","updated_at":"2025-10-28T14:30:48.801Z","avatar_url":"https://github.com/volfpeter.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![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\u0026label=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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolfpeter%2Fmotorhead","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvolfpeter%2Fmotorhead","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolfpeter%2Fmotorhead/lists"}