fastapi-utils


Namefastapi-utils JSON
Version 0.6.0 PyPI version JSON
download
home_pagehttps://fastapi-utils.davidmontague.xyz
SummaryReusable utilities for FastAPI
upload_time2024-05-11 15:05:18
maintainerNone
docs_urlNone
authorYuval Levi
requires_python<4.0,>=3.7
licenseMIT
keywords fastapi oop restful
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
    <em>Quicker FastApi developing tools</em>
</p>
<p align="center">
<a href="https://github.com/dmontagu/fastapi-utils" target="_blank">
	<img src="https://img.shields.io/github/last-commit/dmontagu/fastapi-utils.svg">
	<img src="https://github.com/dmontagu/fastapi-utils/workflows/build/badge.svg" alt="Build CI">
</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>
<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>
<a href="https://github.com/dmontagu/fastapi-utils" target="_blank">
    <img src="https://img.shields.io/pypi/pyversions/fastapi-utils.svg" alt="Python versions">
    <img src="https://img.shields.io/github/license/dmontagu/fastapi-utils.svg" alt="License">
</a>
</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:

* **Resource Class**: Create CRUD with ease the OOP way with `Resource` base class that lets you implement methods quick.
* **Class Based Views**: Stop repeating the same dependencies over and over in the signature of related endpoints.
* **Repeated Tasks**: Easily trigger periodic tasks on server startup
* **Timing Middleware**: Log basic timing information for every request
* **OpenAPI Spec Simplification**: Simplify your OpenAPI Operation IDs for cleaner output from OpenAPI Generator
* **SQLAlchemy Sessions**: The `FastAPISessionMaker` class provides an easily-customized SQLAlchemy Session dependency

---

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://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-restful  # For basic slim package :)

pip install fastapi-restful[session]  # To add sqlalchemy session maker

pip install fastapi-restful[all]  # For all the packages
```

## 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",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.7",
    "maintainer_email": null,
    "keywords": "fastapi, OOP, RESTful",
    "author": "Yuval Levi",
    "author_email": "yuvall9313@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/eb/b7/a8334f16b18f11d3200139c978cab5b90e7cbbd3aee518d4b452c67d2f01/fastapi_utils-0.6.0.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n    <em>Quicker FastApi developing tools</em>\n</p>\n<p align=\"center\">\n<a href=\"https://github.com/dmontagu/fastapi-utils\" target=\"_blank\">\n\t<img src=\"https://img.shields.io/github/last-commit/dmontagu/fastapi-utils.svg\">\n\t<img src=\"https://github.com/dmontagu/fastapi-utils/workflows/build/badge.svg\" alt=\"Build CI\">\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<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<a href=\"https://github.com/dmontagu/fastapi-utils\" target=\"_blank\">\n    <img src=\"https://img.shields.io/pypi/pyversions/fastapi-utils.svg\" alt=\"Python versions\">\n    <img src=\"https://img.shields.io/github/license/dmontagu/fastapi-utils.svg\" alt=\"License\">\n</a>\n</p>\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* **Resource Class**: Create CRUD with ease the OOP way with `Resource` base class that lets you implement methods quick.\n* **Class Based Views**: Stop repeating the same dependencies over and over in the signature of related endpoints.\n* **Repeated Tasks**: Easily trigger periodic tasks on server startup\n* **Timing Middleware**: Log basic timing information for every request\n* **OpenAPI Spec Simplification**: Simplify your OpenAPI Operation IDs for cleaner output from OpenAPI Generator\n* **SQLAlchemy Sessions**: The `FastAPISessionMaker` class provides an easily-customized SQLAlchemy Session dependency\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://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-restful  # For basic slim package :)\n\npip install fastapi-restful[session]  # To add sqlalchemy session maker\n\npip install fastapi-restful[all]  # For all the packages\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",
    "version": "0.6.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",
        " oop",
        " restful"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e7ccc0e6ea8148657eec5d2857e55bd827ceefbf14321fe5840e5f8982d5e791",
                "md5": "5295488806809bc938d0b452dc9fffec",
                "sha256": "8d504d8f88b9cd0f3834e8f8e0545cb890e3bbe661e44fdb4533bb3734610cb7"
            },
            "downloads": -1,
            "filename": "fastapi_utils-0.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5295488806809bc938d0b452dc9fffec",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.7",
            "size": 18296,
            "upload_time": "2024-05-11T15:05:16",
            "upload_time_iso_8601": "2024-05-11T15:05:16.937009Z",
            "url": "https://files.pythonhosted.org/packages/e7/cc/c0e6ea8148657eec5d2857e55bd827ceefbf14321fe5840e5f8982d5e791/fastapi_utils-0.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ebb7a8334f16b18f11d3200139c978cab5b90e7cbbd3aee518d4b452c67d2f01",
                "md5": "16d141202bdb04030829d712a9945e8f",
                "sha256": "4fd34ff7d3bcc8e31fd5c5a9c66c16ca09093e3d97663ed7e3bf013b380766a9"
            },
            "downloads": -1,
            "filename": "fastapi_utils-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "16d141202bdb04030829d712a9945e8f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.7",
            "size": 16199,
            "upload_time": "2024-05-11T15:05:18",
            "upload_time_iso_8601": "2024-05-11T15:05:18.590364Z",
            "url": "https://files.pythonhosted.org/packages/eb/b7/a8334f16b18f11d3200139c978cab5b90e7cbbd3aee518d4b452c67d2f01/fastapi_utils-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-11 15:05:18",
    "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"
}
        
Elapsed time: 0.35590s