fastapi-utils


Namefastapi-utils JSON
Version 0.8.0 PyPI version JSON
download
home_pagehttps://fastapiutils.github.io/fastapi-utils/
SummaryReusable utilities for FastAPI
upload_time2024-11-11 08:30:03
maintainerNone
docs_urlNone
authorYuval Levi
requires_python<4.0,>=3.8
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://fastapiutils.github.io/fastapi-utils/" target="_blank">https://fastapiutils.github.io/fastapi-utils/</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.8+.

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://fastapiutils.github.io/fastapi-utils//) 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.8+.

## Installation

```bash
pip install fastapi-utils  # For basic slim package :)

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

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

## License

This project is licensed under the terms of the MIT license.

            

Raw data

            {
    "_id": null,
    "home_page": "https://fastapiutils.github.io/fastapi-utils/",
    "name": "fastapi-utils",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "fastapi, OOP, RESTful",
    "author": "Yuval Levi",
    "author_email": "yuvall9313@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/dd/af/57c949675176acf389d94fbccd369b486579a952637fc6fb104f1bc3d0c3/fastapi_utils-0.8.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 <img src=\"https://img.shields.io/github/last-commit/dmontagu/fastapi-utils.svg\">\n <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://fastapiutils.github.io/fastapi-utils/\" target=\"_blank\">https://fastapiutils.github.io/fastapi-utils/</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.8+.\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://fastapiutils.github.io/fastapi-utils//) 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.8+.\n\n## Installation\n\n```bash\npip install fastapi-utils  # For basic slim package :)\n\npip install fastapi-utils[session]  # To add sqlalchemy session maker\n\npip install fastapi-utils[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.8.0",
    "project_urls": {
        "Documentation": "https://fastapiutils.github.io/fastapi-utils/",
        "Homepage": "https://fastapiutils.github.io/fastapi-utils/",
        "Repository": "https://github.com/dmontagu/fastapi-utils"
    },
    "split_keywords": [
        "fastapi",
        " oop",
        " restful"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "438bcef8cfed7ed77d52fc772b1c7b966ba019a3f50b65a2b3625a0f3b7f6f53",
                "md5": "cf9bad61cb021ae8206c2771745f622a",
                "sha256": "6c4d507a76bab9a016cee0c4fa3a4638c636b2b2689e39c62254b1b2e4e81825"
            },
            "downloads": -1,
            "filename": "fastapi_utils-0.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cf9bad61cb021ae8206c2771745f622a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 18495,
            "upload_time": "2024-11-11T08:30:01",
            "upload_time_iso_8601": "2024-11-11T08:30:01.914503Z",
            "url": "https://files.pythonhosted.org/packages/43/8b/cef8cfed7ed77d52fc772b1c7b966ba019a3f50b65a2b3625a0f3b7f6f53/fastapi_utils-0.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ddaf57c949675176acf389d94fbccd369b486579a952637fc6fb104f1bc3d0c3",
                "md5": "366c67d003d46a60d9e7eca174bbc960",
                "sha256": "eca834e80c09f85df30004fe5e861981262b296f60c93d5a1a1416fe4c784140"
            },
            "downloads": -1,
            "filename": "fastapi_utils-0.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "366c67d003d46a60d9e7eca174bbc960",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 16496,
            "upload_time": "2024-11-11T08:30:03",
            "upload_time_iso_8601": "2024-11-11T08:30:03.852745Z",
            "url": "https://files.pythonhosted.org/packages/dd/af/57c949675176acf389d94fbccd369b486579a952637fc6fb104f1bc3d0c3/fastapi_utils-0.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-11 08:30:03",
    "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: 1.17291s