fastapi-crudrouter-as3445


Namefastapi-crudrouter-as3445 JSON
Version 0.8.6 PyPI version JSON
download
home_pagehttps://github.com/as3445/fastapi-crudrouter
SummaryA dynamic FastAPI router that automatically creates CRUD routes for your models
upload_time2023-08-15 15:11:13
maintainer
docs_urlNone
author
requires_python>=3.7
licenseMIT
keywords fastapi crud restful routing generator crudrouter
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <img src="https://raw.githubusercontent.com/awtkns/fastapi-crudrouter/master/docs/en/docs/assets/logo.png" height="200" />
</p>
<p align="center">
  <em>⚡ Create CRUD routes with lighting speed</em> ⚡</br>
  <sub>A dynamic FastAPI router that automatically creates CRUD routes for your models</sub>
</p>
<p align="center">
<img alt="Tests" src="https://img.shields.io/github/actions/workflow/status/awtkns/fastapi-crudrouter/.github/workflows/pytest.yml?color=%2334D058" />
<img alt="Downloads" src="https://img.shields.io/pypi/dm/fastapi-crudrouter?color=%2334D058" />
  <a href="https://pypi.org/project/fastapi-crudrouter" target="_blank">
    <img src="https://img.shields.io/pypi/v/fastapi-crudrouter?color=%2334D058&label=pypi%20package" alt="Package version">
</a>
  <img alt="License" src="https://img.shields.io/github/license/awtkns/fastapi-crudrouter?color=%2334D058" />
</p>
<p align="center">
<img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/fastapi-crudrouter">
</p>

---

**Documentation**: <a href="https://fastapi-crudrouter.awtkns.com" target="_blank">https://fastapi-crudrouter.awtkns.com</a>

**Source Code**: <a href="https://github.com/awtkns/fastapi-crudrouter" target="_blank">https://github.com/awtkns/fastapi-crudrouter</a>

---
Tired of rewriting generic CRUD routes? Need to rapidly prototype a feature for a presentation
or a hackathon? Thankfully, [fastapi-crudrouter](https://github.com/awtkns/fastapi-crudrouter) has your back. As an 
extension to the APIRouter included with [FastAPI](https://fastapi.tiangolo.com/), the FastAPI CRUDRouter will automatically
generate and document your CRUD routes for you, all you have to do is pass your model and maybe your database connection.

FastAPI-CRUDRouter is **lighting fast**, well tested, and **production ready**.


## Installation
```bash
pip install fastapi-crudrouter
```

## Basic Usage
Below is a simple example of what the CRUDRouter can do. In just ten lines of code, you can generate all 
the crud routes you need for any model. A full list of the routes generated can be found [here](https://fastapi-crudrouter.awtkns.com/routing).

```python
from pydantic import BaseModel
from fastapi import FastAPI
from fastapi_crudrouter import MemoryCRUDRouter as CRUDRouter

class Potato(BaseModel):
    id: int
    color: str
    mass: float

app = FastAPI()
app.include_router(CRUDRouter(schema=Potato))
```

## Advanced Usage
fastapi-crudrouter provides a number of features that allow you to get the most out of your automatically generated CRUD
routes. Listed below are some highlights.

- Automatic Pagination ([docs](https://fastapi-crudrouter.awtkns.com/pagination/))
- Ability to Provide Custom Create and Update Schemas ([docs](https://fastapi-crudrouter.awtkns.com/schemas/))
- Dynamic Generation of Create and Update Schemas ([docs](https://fastapi-crudrouter.awtkns.com/schemas/))
- Ability to Add, Customize, or Disable Specific Routes ([docs](https://fastapi-crudrouter.awtkns.com/routing/))
- Native Support for FastAPI Dependency Injection ([docs](https://fastapi-crudrouter.awtkns.com/dependencies/))

## Supported Backends / ORMs
fastapi-crudrouter currently supports a number of backends / ORMs. Listed below are the backends currently supported. This list will
likely grow in future releases.

- In Memory ([docs](https://fastapi-crudrouter.awtkns.com/backends/memory/))
- SQLAlchemy ([docs](https://fastapi-crudrouter.awtkns.com/backends/sqlalchemy/))
- Databases (async) ([docs](https://fastapi-crudrouter.awtkns.com/backends/async/))
- Gino (async) ([docs](https://fastapi-crudrouter.awtkns.com/backends/gino.html)) 
- Ormar (async) ([docs](https://fastapi-crudrouter.awtkns.com/backends/ormar/))
- Tortoise ORM  (async) ([docs](https://fastapi-crudrouter.awtkns.com/backends/tortoise/))

## OpenAPI Support
By default, all routes generated by the CRUDRouter will be documented according to OpenAPI spec.

Below are the default routes created by the CRUDRouter shown in the generated OpenAPI documentation.

![OpenAPI Route Overview](https://raw.githubusercontent.com/awtkns/fastapi-crudrouter/master/docs/en/docs/assets/RouteOverview.png)

The CRUDRouter is able to dynamically generate detailed documentation based on the models given to it.

![OpenAPI Route Detail](https://raw.githubusercontent.com/awtkns/fastapi-crudrouter/master/docs/en/docs/assets/RouteDetail.png)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/as3445/fastapi-crudrouter",
    "name": "fastapi-crudrouter-as3445",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "fastapi,crud,restful,routing,generator,crudrouter",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/62/0b/61a863f43d0611f6275de41f991b5e150d2f172220ec8c2e48fe2f1cf628/fastapi-crudrouter-as3445-0.8.6.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/awtkns/fastapi-crudrouter/master/docs/en/docs/assets/logo.png\" height=\"200\" />\n</p>\n<p align=\"center\">\n  <em>\u26a1 Create CRUD routes with lighting speed</em> \u26a1</br>\n  <sub>A dynamic FastAPI router that automatically creates CRUD routes for your models</sub>\n</p>\n<p align=\"center\">\n<img alt=\"Tests\" src=\"https://img.shields.io/github/actions/workflow/status/awtkns/fastapi-crudrouter/.github/workflows/pytest.yml?color=%2334D058\" />\n<img alt=\"Downloads\" src=\"https://img.shields.io/pypi/dm/fastapi-crudrouter?color=%2334D058\" />\n  <a href=\"https://pypi.org/project/fastapi-crudrouter\" target=\"_blank\">\n    <img src=\"https://img.shields.io/pypi/v/fastapi-crudrouter?color=%2334D058&label=pypi%20package\" alt=\"Package version\">\n</a>\n  <img alt=\"License\" src=\"https://img.shields.io/github/license/awtkns/fastapi-crudrouter?color=%2334D058\" />\n</p>\n<p align=\"center\">\n<img alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/fastapi-crudrouter\">\n</p>\n\n---\n\n**Documentation**: <a href=\"https://fastapi-crudrouter.awtkns.com\" target=\"_blank\">https://fastapi-crudrouter.awtkns.com</a>\n\n**Source Code**: <a href=\"https://github.com/awtkns/fastapi-crudrouter\" target=\"_blank\">https://github.com/awtkns/fastapi-crudrouter</a>\n\n---\nTired of rewriting generic CRUD routes? Need to rapidly prototype a feature for a presentation\nor a hackathon? Thankfully, [fastapi-crudrouter](https://github.com/awtkns/fastapi-crudrouter) has your back. As an \nextension to the APIRouter included with [FastAPI](https://fastapi.tiangolo.com/), the FastAPI CRUDRouter will automatically\ngenerate and document your CRUD routes for you, all you have to do is pass your model and maybe your database connection.\n\nFastAPI-CRUDRouter is **lighting fast**, well tested, and **production ready**.\n\n\n## Installation\n```bash\npip install fastapi-crudrouter\n```\n\n## Basic Usage\nBelow is a simple example of what the CRUDRouter can do. In just ten lines of code, you can generate all \nthe crud routes you need for any model. A full list of the routes generated can be found [here](https://fastapi-crudrouter.awtkns.com/routing).\n\n```python\nfrom pydantic import BaseModel\nfrom fastapi import FastAPI\nfrom fastapi_crudrouter import MemoryCRUDRouter as CRUDRouter\n\nclass Potato(BaseModel):\n    id: int\n    color: str\n    mass: float\n\napp = FastAPI()\napp.include_router(CRUDRouter(schema=Potato))\n```\n\n## Advanced Usage\nfastapi-crudrouter provides a number of features that allow you to get the most out of your automatically generated CRUD\nroutes. Listed below are some highlights.\n\n- Automatic Pagination ([docs](https://fastapi-crudrouter.awtkns.com/pagination/))\n- Ability to Provide Custom Create and Update Schemas ([docs](https://fastapi-crudrouter.awtkns.com/schemas/))\n- Dynamic Generation of Create and Update Schemas ([docs](https://fastapi-crudrouter.awtkns.com/schemas/))\n- Ability to Add, Customize, or Disable Specific Routes ([docs](https://fastapi-crudrouter.awtkns.com/routing/))\n- Native Support for FastAPI Dependency Injection ([docs](https://fastapi-crudrouter.awtkns.com/dependencies/))\n\n## Supported Backends / ORMs\nfastapi-crudrouter currently supports a number of backends / ORMs. Listed below are the backends currently supported. This list will\nlikely grow in future releases.\n\n- In Memory ([docs](https://fastapi-crudrouter.awtkns.com/backends/memory/))\n- SQLAlchemy ([docs](https://fastapi-crudrouter.awtkns.com/backends/sqlalchemy/))\n- Databases (async) ([docs](https://fastapi-crudrouter.awtkns.com/backends/async/))\n- Gino (async) ([docs](https://fastapi-crudrouter.awtkns.com/backends/gino.html)) \n- Ormar (async) ([docs](https://fastapi-crudrouter.awtkns.com/backends/ormar/))\n- Tortoise ORM  (async) ([docs](https://fastapi-crudrouter.awtkns.com/backends/tortoise/))\n\n## OpenAPI Support\nBy default, all routes generated by the CRUDRouter will be documented according to OpenAPI spec.\n\nBelow are the default routes created by the CRUDRouter shown in the generated OpenAPI documentation.\n\n![OpenAPI Route Overview](https://raw.githubusercontent.com/awtkns/fastapi-crudrouter/master/docs/en/docs/assets/RouteOverview.png)\n\nThe CRUDRouter is able to dynamically generate detailed documentation based on the models given to it.\n\n![OpenAPI Route Detail](https://raw.githubusercontent.com/awtkns/fastapi-crudrouter/master/docs/en/docs/assets/RouteDetail.png)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A dynamic FastAPI router that automatically creates CRUD routes for your models",
    "version": "0.8.6",
    "project_urls": {
        "Homepage": "https://github.com/as3445/fastapi-crudrouter"
    },
    "split_keywords": [
        "fastapi",
        "crud",
        "restful",
        "routing",
        "generator",
        "crudrouter"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "edc476d7761a5cbd87083b9686089926e7f82e0081239a6fb4230af7e7051ffb",
                "md5": "90bf445321583c6724b2e17a3c89840d",
                "sha256": "dfd00830f7c1a7e03162b03232e34eaf39a6bc71b2217c8d93bdb4f9f29ffa4b"
            },
            "downloads": -1,
            "filename": "fastapi_crudrouter_as3445-0.8.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "90bf445321583c6724b2e17a3c89840d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 16329,
            "upload_time": "2023-08-15T15:11:12",
            "upload_time_iso_8601": "2023-08-15T15:11:12.803337Z",
            "url": "https://files.pythonhosted.org/packages/ed/c4/76d7761a5cbd87083b9686089926e7f82e0081239a6fb4230af7e7051ffb/fastapi_crudrouter_as3445-0.8.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "620b61a863f43d0611f6275de41f991b5e150d2f172220ec8c2e48fe2f1cf628",
                "md5": "9dbc96f4c58baa766e1a41b2114b5efb",
                "sha256": "ddf7fe4434fdae5421e7e0f6bb75cecbac824ed26013a344dc0ddf2681536d49"
            },
            "downloads": -1,
            "filename": "fastapi-crudrouter-as3445-0.8.6.tar.gz",
            "has_sig": false,
            "md5_digest": "9dbc96f4c58baa766e1a41b2114b5efb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 12331,
            "upload_time": "2023-08-15T15:11:13",
            "upload_time_iso_8601": "2023-08-15T15:11:13.961263Z",
            "url": "https://files.pythonhosted.org/packages/62/0b/61a863f43d0611f6275de41f991b5e150d2f172220ec8c2e48fe2f1cf628/fastapi-crudrouter-as3445-0.8.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-15 15:11:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "as3445",
    "github_project": "fastapi-crudrouter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "fastapi-crudrouter-as3445"
}
        
Elapsed time: 0.10453s