fastapi_template


Namefastapi_template JSON
Version 5.1.2 PyPI version JSON
download
home_pagehttps://github.com/s3rius/FastAPI-template
SummaryFeature-rich robust FastAPI template
upload_time2024-07-15 22:00:27
maintainerNone
docs_urlNone
authorPavel Kirilin
requires_python<4.0,>=3.9
licenseNone
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 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, Ormar and Beanie 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
  --quiet                         Do not ask for features during generation
  --api-type [rest|graphql]       Select API type for your application
  --db [none|sqlite|mysql|postgresql|mongodb]
                                  Select a database for your app
  --orm [none|ormar|sqlalchemy|tortoise|psycopg|piccolo|beanie]
                                  Choose Object–Relational Mapper lib
  --ci [none|gitlab_ci|github]    Select a CI for your app
  --redis                         Add redis support
  --add_users                     Add fastapi-users 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
  --cookie-auth                   Add authentication via cookie support
  --jwt-auth                      Add JWT auth support
  --help                          Show this message and exit.
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/s3rius/FastAPI-template",
    "name": "fastapi_template",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "FastAPI, Cookiecutter, Template",
    "author": "Pavel Kirilin",
    "author_email": "win10@list.ru",
    "download_url": "https://files.pythonhosted.org/packages/cf/9b/ca737144f90e2d7b3b3f5b9da3f6550cc0f0ac1cdcc8598ee86cb5066690/fastapi_template-5.1.2.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 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, Ormar and Beanie 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  --quiet                         Do not ask for features during generation\n  --api-type [rest|graphql]       Select API type for your application\n  --db [none|sqlite|mysql|postgresql|mongodb]\n                                  Select a database for your app\n  --orm [none|ormar|sqlalchemy|tortoise|psycopg|piccolo|beanie]\n                                  Choose Object\u2013Relational Mapper lib\n  --ci [none|gitlab_ci|github]    Select a CI for your app\n  --redis                         Add redis support\n  --add_users                     Add fastapi-users 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  --cookie-auth                   Add authentication via cookie support\n  --jwt-auth                      Add JWT auth support\n  --help                          Show this message and exit.\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Feature-rich robust FastAPI template",
    "version": "5.1.2",
    "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": "068e3655417c05698a385423d521f50d2b260d443f03d8c0328f883d21977729",
                "md5": "34edf910a67ce7a166a7959b60cd9579",
                "sha256": "93c6ce044366199125b1821ffde9c39102ee2dfcdfcf883e7a570ce0bd2def8f"
            },
            "downloads": -1,
            "filename": "fastapi_template-5.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "34edf910a67ce7a166a7959b60cd9579",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 870925,
            "upload_time": "2024-07-15T22:00:24",
            "upload_time_iso_8601": "2024-07-15T22:00:24.209649Z",
            "url": "https://files.pythonhosted.org/packages/06/8e/3655417c05698a385423d521f50d2b260d443f03d8c0328f883d21977729/fastapi_template-5.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cf9bca737144f90e2d7b3b3f5b9da3f6550cc0f0ac1cdcc8598ee86cb5066690",
                "md5": "adc88ebe972a26028e3a9f0beaac0cbd",
                "sha256": "a2a61fb7f3d865cc453b522f09f7262f54ccb308996e3deb16a41279af85d843"
            },
            "downloads": -1,
            "filename": "fastapi_template-5.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "adc88ebe972a26028e3a9f0beaac0cbd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 803367,
            "upload_time": "2024-07-15T22:00:27",
            "upload_time_iso_8601": "2024-07-15T22:00:27.126071Z",
            "url": "https://files.pythonhosted.org/packages/cf/9b/ca737144f90e2d7b3b3f5b9da3f6550cc0f0ac1cdcc8598ee86cb5066690/fastapi_template-5.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-15 22:00:27",
    "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: 2.96488s