<p align="center">
<em>Reusable utilities for FastAPI</em>
</p>
<p align="center">
<img src="https://img.shields.io/github/last-commit/dmontagu/fastapi-utils.svg">
<a href="https://github.com/dmontagu/fastapi-utils" target="_blank">
<img src="https://github.com/dmontagu/fastapi-utils/workflows/build/badge.svg" alt="Build">
</a>
<a href="https://codecov.io/gh/dmontagu/fastapi-utils" target="_blank">
<img src="https://codecov.io/gh/dmontagu/fastapi-utils/branch/master/graph/badge.svg" alt="Coverage">
</a>
<a href="https://app.netlify.com/sites/trusting-archimedes-72b369/deploys">
<img src="https://img.shields.io/netlify/28b2a077-65b1-4d6c-9dba-13aaf6059877" alt="Netlify status">
</a>
<br />
<a href="https://pypi.org/project/fastapi-utils" target="_blank">
<img src="https://badge.fury.io/py/fastapi-utils.svg" alt="Package version">
</a>
<img src="https://img.shields.io/pypi/pyversions/fastapi-utils.svg">
<img src="https://img.shields.io/github/license/dmontagu/fastapi-utils.svg">
</p>
---
**Documentation**: <a href="https://fastapi-utils.davidmontague.xyz" target="_blank">https://fastapi-utils.davidmontague.xyz</a>
**Source Code**: <a href="https://github.com/dmontagu/fastapi-utils" target="_blank">https://github.com/dmontagu/fastapi-utils</a>
---
<a href="https://fastapi.tiangolo.com">FastAPI</a> is a modern, fast web framework for building APIs with Python 3.7+.
But if you're here, you probably already knew that!
---
## Features
This package includes a number of utilities to help reduce boilerplate and reuse common functionality across projects:
* **Class Based Views**: Stop repeating the same dependencies over and over in the signature of related endpoints.
* **Response-Model Inferring Router**: Let FastAPI infer the `response_model` to use based on your return type annotation.
* **Repeated Tasks**: Easily trigger periodic tasks on server startup
* **Timing Middleware**: Log basic timing information for every request
* **SQLAlchemy Sessions**: The `FastAPISessionMaker` class provides an easily-customized SQLAlchemy Session dependency
* **OpenAPI Spec Simplification**: Simplify your OpenAPI Operation IDs for cleaner output from OpenAPI Generator
---
It also adds a variety of more basic utilities that are useful across a wide variety of projects:
* **APIModel**: A reusable `pydantic.BaseModel`-derived base class with useful defaults
* **APISettings**: A subclass of `pydantic.BaseSettings` that makes it easy to configure FastAPI through environment variables
* **String-Valued Enums**: The `StrEnum` and `CamelStrEnum` classes make string-valued enums easier to maintain
* **CamelCase Conversions**: Convenience functions for converting strings from `snake_case` to `camelCase` or `PascalCase` and back
* **GUID Type**: The provided GUID type makes it easy to use UUIDs as the primary keys for your database tables
See the [docs](https://fastapi-utils.davidmontague.xyz/) for more details and examples.
## Requirements
This package is intended for use with any recent version of FastAPI (depending on `pydantic>=1.0`), and Python 3.7+.
## Installation
```bash
pip install fastapi-utils
```
## License
This project is licensed under the terms of the MIT license.
Raw data
{
"_id": null,
"home_page": "https://fastapi-utils.davidmontague.xyz",
"name": "fastapi-utils-sqlalch2",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7,<4.0",
"maintainer_email": "",
"keywords": "fastapi,utilities,utils,sql-alchemy",
"author": "David Montague",
"author_email": "davwmont@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/15/ec/f2f06a969f50cacf79b1d8f2547cfcf889aac11d3819d6f8de2c2895c37b/fastapi_utils_sqlalch2-0.3.0.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <em>Reusable utilities for FastAPI</em>\n</p>\n<p align=\"center\">\n<img src=\"https://img.shields.io/github/last-commit/dmontagu/fastapi-utils.svg\">\n<a href=\"https://github.com/dmontagu/fastapi-utils\" target=\"_blank\">\n <img src=\"https://github.com/dmontagu/fastapi-utils/workflows/build/badge.svg\" alt=\"Build\">\n</a>\n<a href=\"https://codecov.io/gh/dmontagu/fastapi-utils\" target=\"_blank\">\n <img src=\"https://codecov.io/gh/dmontagu/fastapi-utils/branch/master/graph/badge.svg\" alt=\"Coverage\">\n</a>\n<a href=\"https://app.netlify.com/sites/trusting-archimedes-72b369/deploys\">\n <img src=\"https://img.shields.io/netlify/28b2a077-65b1-4d6c-9dba-13aaf6059877\" alt=\"Netlify status\">\n</a>\n<br />\n<a href=\"https://pypi.org/project/fastapi-utils\" target=\"_blank\">\n <img src=\"https://badge.fury.io/py/fastapi-utils.svg\" alt=\"Package version\">\n</a>\n <img src=\"https://img.shields.io/pypi/pyversions/fastapi-utils.svg\">\n <img src=\"https://img.shields.io/github/license/dmontagu/fastapi-utils.svg\">\n</p>\n\n---\n\n**Documentation**: <a href=\"https://fastapi-utils.davidmontague.xyz\" target=\"_blank\">https://fastapi-utils.davidmontague.xyz</a>\n\n**Source Code**: <a href=\"https://github.com/dmontagu/fastapi-utils\" target=\"_blank\">https://github.com/dmontagu/fastapi-utils</a>\n\n---\n\n<a href=\"https://fastapi.tiangolo.com\">FastAPI</a> is a modern, fast web framework for building APIs with Python 3.7+.\n\nBut if you're here, you probably already knew that!\n\n---\n\n## Features\n\nThis package includes a number of utilities to help reduce boilerplate and reuse common functionality across projects:\n\n* **Class Based Views**: Stop repeating the same dependencies over and over in the signature of related endpoints.\n* **Response-Model Inferring Router**: Let FastAPI infer the `response_model` to use based on your return type annotation. \n* **Repeated Tasks**: Easily trigger periodic tasks on server startup\n* **Timing Middleware**: Log basic timing information for every request\n* **SQLAlchemy Sessions**: The `FastAPISessionMaker` class provides an easily-customized SQLAlchemy Session dependency \n* **OpenAPI Spec Simplification**: Simplify your OpenAPI Operation IDs for cleaner output from OpenAPI Generator\n\n---\n\nIt also adds a variety of more basic utilities that are useful across a wide variety of projects:\n\n* **APIModel**: A reusable `pydantic.BaseModel`-derived base class with useful defaults\n* **APISettings**: A subclass of `pydantic.BaseSettings` that makes it easy to configure FastAPI through environment variables \n* **String-Valued Enums**: The `StrEnum` and `CamelStrEnum` classes make string-valued enums easier to maintain\n* **CamelCase Conversions**: Convenience functions for converting strings from `snake_case` to `camelCase` or `PascalCase` and back\n* **GUID Type**: The provided GUID type makes it easy to use UUIDs as the primary keys for your database tables\n\nSee the [docs](https://fastapi-utils.davidmontague.xyz/) for more details and examples. \n\n## Requirements\n\nThis package is intended for use with any recent version of FastAPI (depending on `pydantic>=1.0`), and Python 3.7+.\n\n## Installation\n\n```bash\npip install fastapi-utils\n```\n\n## License\n\nThis project is licensed under the terms of the MIT license.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Reusable utilities for FastAPI with support sqlalchemy 2.0",
"version": "0.3.0",
"project_urls": {
"Documentation": "https://fastapi-utils.davidmontague.xyz",
"Homepage": "https://fastapi-utils.davidmontague.xyz",
"Repository": "https://github.com/dmontagu/fastapi-utils"
},
"split_keywords": [
"fastapi",
"utilities",
"utils",
"sql-alchemy"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1dec5532b4afd3ac1ff1f4723346b67196f266852c9b836fd1949af5c74b7fff",
"md5": "e9bc4d5c93966bb9dbe5994bfa1098c8",
"sha256": "52faa8c981f3f30d99ca2d026d7241612e6c0f48397425f0f84add10a3fd76a9"
},
"downloads": -1,
"filename": "fastapi_utils_sqlalch2-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e9bc4d5c93966bb9dbe5994bfa1098c8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 16482,
"upload_time": "2023-05-19T15:11:49",
"upload_time_iso_8601": "2023-05-19T15:11:49.708799Z",
"url": "https://files.pythonhosted.org/packages/1d/ec/5532b4afd3ac1ff1f4723346b67196f266852c9b836fd1949af5c74b7fff/fastapi_utils_sqlalch2-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "15ecf2f06a969f50cacf79b1d8f2547cfcf889aac11d3819d6f8de2c2895c37b",
"md5": "eb0cef9a9abddfa223b07f525107c114",
"sha256": "e6aa7a258209a14ba3747af01762f1521ddc648465f6153b5cf868eb39772eba"
},
"downloads": -1,
"filename": "fastapi_utils_sqlalch2-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "eb0cef9a9abddfa223b07f525107c114",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 14246,
"upload_time": "2023-05-19T15:11:52",
"upload_time_iso_8601": "2023-05-19T15:11:52.111549Z",
"url": "https://files.pythonhosted.org/packages/15/ec/f2f06a969f50cacf79b1d8f2547cfcf889aac11d3819d6f8de2c2895c37b/fastapi_utils_sqlalch2-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-19 15:11:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dmontagu",
"github_project": "fastapi-utils",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "fastapi-utils-sqlalch2"
}