fastapi_template


Namefastapi_template JSON
Version 5.1.0 PyPI version JSON
download
home_pagehttps://github.com/s3rius/FastAPI-template
SummaryFeature-rich robust FastAPI template
upload_time2023-09-12 08:21:50
maintainer
docs_urlNone
authorPavel Kirilin
requires_python>=3.8,<4.0
license
keywords fastapi cookiecutter template
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![python version](https://img.shields.io/pypi/pyversions/fastapi_template?style=for-the-badge) [![version](https://img.shields.io/pypi/v/fastapi_template?style=for-the-badge)](https://pypi.org/project/fastapi-template/)
[![](https://img.shields.io/pypi/dm/fastapi_template?style=for-the-badge)](https://pypi.org/project/fastapi-template/)
<div align="center">
<img src="https://raw.githubusercontent.com/s3rius/FastAPI-template/master/images/logo.png" width=700>
<div><i>Flexible general-purpose template for FastAPI.</i></div>
</div>

## Usage

⚠️ [Git](https://git-scm.com/downloads), [Python](https://www.python.org/) and [Poetry](https://python-poetry.org/) must be installed and accessible ⚠️

Poetry version must be greater or equal than 1.1.8. Otherwise it won't be able to install SQLAlchemy.

<div align="center">
 <a href="https://asciinema.org/a/ig0oi0fOq1hxqnW5X49XaaHIT" target="_blank"><img src="https://asciinema.org/a/ig0oi0fOq1hxqnW5X49XaaHIT.svg" /></a>
  <p>Templator in action</p>
</div>

You can install it directly from pypi with pip.
```bash
python3 -m pip install fastapi_template
python3 -m fastapi_template
# or fastapi_template
# Answer all the questions
# 🍪 Enjoy your new project 🍪
cd new_project
docker-compose -f deploy/docker-compose.yml --project-directory . build
docker-compose -f deploy/docker-compose.yml --project-directory . up --build
```

If you want to install it from sources, try this:
```shell
python3 -m pip install poetry
python3 -m pip install .
python3 -m fastapi_template
```

Also, you can use it with docker.
```bash
docker run --rm -it -v "$(pwd):/projects" s3rius/fastapi_template
```

## Features

One of the coolest features is that this project is extremely configurable.
You can choose between different databases and even ORMs, or
you can even generate a project without a database!
Currently SQLAlchemy 2.0, TortoiseORM, Piccolo and Ormar are supported.

This project can run as TUI or CLI and has excellent code documentation.

Generator features:
- Pydantic V2 (Where it's possible. Some libs doesn't have support);
- You can choose between GraphQL and REST api;
- Uvicorn and gunicorn;
- Different databases support;
- Different ORMs support;
- Optional migrations for each ORM except raw drivers;
- Optional redis support;
- Optional rabbitmq support;
- different CI\CD;
- Optional Kubernetes config generation;
- Optional Demo routers and models (This helps you to see how project is structured);
- Pre-commit integration;
- Generated tests with almost 90% coverage;
- Tests for the generator itself;
- Optional Prometheus integration;
- Optional Sentry integration;
- Optional Loguru logger;
- Optional Opentelemetry integration.
- Optional taskiq integration.


This project can handle arguments passed through command line.

```shell
$ python -m fastapi_template --help

Usage: fastapi_template [OPTIONS]

Options:
  -n, --name TEXT                 Name of your awesome project
  -V, --version                   Prints current version
  --force                         Owerrite directory if it exists
  --quite                         Do not ask for features during generation
  --api-type [rest|graphql]       Select API type for your application
  --db [none|sqlite|mysql|postgresql]
                                  Select a database for your app
  --orm [none|ormar|sqlalchemy|tortoise|psycopg|piccolo]
                                  Choose Object–Relational Mapper lib
  --ci [none|gitlab_ci|github]    Select a CI for your app
  --redis                         Add redis support
  --rabbit                        Add RabbitMQ support
  --taskiq                        Add Taskiq support
  --migrations                    Add Migrations
  --kube                          Add kubernetes configs
  --dummy                         Add dummy model
  --routers                       Add example routers
  --swagger                       Add self hosted swagger
  --prometheus                    Add prometheus compatible metrics
  --sentry                        Add sentry integration
  --loguru                        Add loguru logger
  --opentelemetry                 Add opentelemetry integration
  --traefik                       Adds traefik labels to docker container
  --kafka                         Add Kafka support
  --gunicorn                      Add gunicorn server
  --help                          Show this message and exit.
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/s3rius/FastAPI-template",
    "name": "fastapi_template",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "FastAPI,Cookiecutter,Template",
    "author": "Pavel Kirilin",
    "author_email": "win10@list.ru",
    "download_url": "https://files.pythonhosted.org/packages/da/7a/dbf8aa8e810e0ca66c0888aeacc7145603491b9abd8909f7223d76c7071c/fastapi_template-5.1.0.tar.gz",
    "platform": null,
    "description": "![python version](https://img.shields.io/pypi/pyversions/fastapi_template?style=for-the-badge) [![version](https://img.shields.io/pypi/v/fastapi_template?style=for-the-badge)](https://pypi.org/project/fastapi-template/)\n[![](https://img.shields.io/pypi/dm/fastapi_template?style=for-the-badge)](https://pypi.org/project/fastapi-template/)\n<div align=\"center\">\n<img src=\"https://raw.githubusercontent.com/s3rius/FastAPI-template/master/images/logo.png\" width=700>\n<div><i>Flexible general-purpose template for FastAPI.</i></div>\n</div>\n\n## Usage\n\n\u26a0\ufe0f [Git](https://git-scm.com/downloads), [Python](https://www.python.org/) and [Poetry](https://python-poetry.org/) must be installed and accessible \u26a0\ufe0f\n\nPoetry version must be greater or equal than 1.1.8. Otherwise it won't be able to install SQLAlchemy.\n\n<div align=\"center\">\n <a href=\"https://asciinema.org/a/ig0oi0fOq1hxqnW5X49XaaHIT\" target=\"_blank\"><img src=\"https://asciinema.org/a/ig0oi0fOq1hxqnW5X49XaaHIT.svg\" /></a>\n  <p>Templator in action</p>\n</div>\n\nYou can install it directly from pypi with pip.\n```bash\npython3 -m pip install fastapi_template\npython3 -m fastapi_template\n# or fastapi_template\n# Answer all the questions\n# \ud83c\udf6a Enjoy your new project \ud83c\udf6a\ncd new_project\ndocker-compose -f deploy/docker-compose.yml --project-directory . build\ndocker-compose -f deploy/docker-compose.yml --project-directory . up --build\n```\n\nIf you want to install it from sources, try this:\n```shell\npython3 -m pip install poetry\npython3 -m pip install .\npython3 -m fastapi_template\n```\n\nAlso, you can use it with docker.\n```bash\ndocker run --rm -it -v \"$(pwd):/projects\" s3rius/fastapi_template\n```\n\n## Features\n\nOne of the coolest features is that this project is extremely configurable.\nYou can choose between different databases and even ORMs, or\nyou can even generate a project without a database!\nCurrently SQLAlchemy 2.0, TortoiseORM, Piccolo and Ormar are supported.\n\nThis project can run as TUI or CLI and has excellent code documentation.\n\nGenerator features:\n- Pydantic V2 (Where it's possible. Some libs doesn't have support);\n- You can choose between GraphQL and REST api;\n- Uvicorn and gunicorn;\n- Different databases support;\n- Different ORMs support;\n- Optional migrations for each ORM except raw drivers;\n- Optional redis support;\n- Optional rabbitmq support;\n- different CI\\CD;\n- Optional Kubernetes config generation;\n- Optional Demo routers and models (This helps you to see how project is structured);\n- Pre-commit integration;\n- Generated tests with almost 90% coverage;\n- Tests for the generator itself;\n- Optional Prometheus integration;\n- Optional Sentry integration;\n- Optional Loguru logger;\n- Optional Opentelemetry integration.\n- Optional taskiq integration.\n\n\nThis project can handle arguments passed through command line.\n\n```shell\n$ python -m fastapi_template --help\n\nUsage: fastapi_template [OPTIONS]\n\nOptions:\n  -n, --name TEXT                 Name of your awesome project\n  -V, --version                   Prints current version\n  --force                         Owerrite directory if it exists\n  --quite                         Do not ask for features during generation\n  --api-type [rest|graphql]       Select API type for your application\n  --db [none|sqlite|mysql|postgresql]\n                                  Select a database for your app\n  --orm [none|ormar|sqlalchemy|tortoise|psycopg|piccolo]\n                                  Choose Object\u2013Relational Mapper lib\n  --ci [none|gitlab_ci|github]    Select a CI for your app\n  --redis                         Add redis support\n  --rabbit                        Add RabbitMQ support\n  --taskiq                        Add Taskiq support\n  --migrations                    Add Migrations\n  --kube                          Add kubernetes configs\n  --dummy                         Add dummy model\n  --routers                       Add example routers\n  --swagger                       Add self hosted swagger\n  --prometheus                    Add prometheus compatible metrics\n  --sentry                        Add sentry integration\n  --loguru                        Add loguru logger\n  --opentelemetry                 Add opentelemetry integration\n  --traefik                       Adds traefik labels to docker container\n  --kafka                         Add Kafka support\n  --gunicorn                      Add gunicorn server\n  --help                          Show this message and exit.\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Feature-rich robust FastAPI template",
    "version": "5.1.0",
    "project_urls": {
        "Homepage": "https://github.com/s3rius/FastAPI-template",
        "Repository": "https://github.com/s3rius/FastAPI-template"
    },
    "split_keywords": [
        "fastapi",
        "cookiecutter",
        "template"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b016ba0bf15faf9a9d3bfead9dd5d9ee80ad2839a7bd31de81ac5fddd4c0b5d2",
                "md5": "38075164e07bcfd39c05426613e1dcfe",
                "sha256": "504f44b14027a6131912e7ff903c268658c45ef9ce84134ae34ac9dfadd3e4e4"
            },
            "downloads": -1,
            "filename": "fastapi_template-5.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "38075164e07bcfd39c05426613e1dcfe",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 871198,
            "upload_time": "2023-09-12T08:21:48",
            "upload_time_iso_8601": "2023-09-12T08:21:48.398450Z",
            "url": "https://files.pythonhosted.org/packages/b0/16/ba0bf15faf9a9d3bfead9dd5d9ee80ad2839a7bd31de81ac5fddd4c0b5d2/fastapi_template-5.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "da7adbf8aa8e810e0ca66c0888aeacc7145603491b9abd8909f7223d76c7071c",
                "md5": "c06c0d84f2d6a89fc2e9a2f158e3e222",
                "sha256": "d45d3d4996e8fa2a24520473ed621969568a17fdfeae85d8cc2f768fad6f01e8"
            },
            "downloads": -1,
            "filename": "fastapi_template-5.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c06c0d84f2d6a89fc2e9a2f158e3e222",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 804063,
            "upload_time": "2023-09-12T08:21:50",
            "upload_time_iso_8601": "2023-09-12T08:21:50.786654Z",
            "url": "https://files.pythonhosted.org/packages/da/7a/dbf8aa8e810e0ca66c0888aeacc7145603491b9abd8909f7223d76c7071c/fastapi_template-5.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-12 08:21:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "s3rius",
    "github_project": "FastAPI-template",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "fastapi_template"
}
        
Elapsed time: 0.11263s