Metadata-Version: 2.1
Name: create-fastapi-app
Version: 0.4.0
Summary: Wrapper for initializing FastAPI projects - Create Fastapi App
Author: Tomas Sladecek
License: MIT License
        
        Copyright (c) 2022 Tomáš Sládeček
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/tsladecek/create-fastapi-app
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer (<1,>=0.6)
Requires-Dist: colorama (<1,>=0.4)
Requires-Dist: rich (<13,>=12.6)
Requires-Dist: shellingham (<2,>=1.5)

# Create FastAPI App (cfa)

Create and manage FastAPI applications

## Quick Tour

Follow these steps to set up a FastAPI project. See the [documentation](https://tsladecek.github.io/create-fastapi-app/) for more details.

### Installation

This is a [pip package](https://pypi.org/project/create-fastapi-app/). Thus, the only thing you need to do, is to run:

```shell
pip install create-fastapi-app
```

### Usage

To create a new applications at a directory `~/my_fastapi_dir`, run:

```shell
cfa create ~/my_fastapi_dir
```

#### Options

##### Auth

You can choose from three auth setups:

- none - no auth (default)
- self - self-managed auth

    ```shell
    cfa create ~/my_fastapi_dir --auth=self
    ```

    Will create a `users` table and auth mechanisms for authorizing requests

- backend - auth managed by other backend

    ```shell
    cfa create ~/my_fastapi_dir --auth=backend
    ```

    Will create a logic for authorizing requests via external backend API. Remember to set the `BACKEND_URL` env var, as well as the `GET_USER_BY_TOKEN_ENDPOINT` env variable.

    When trying to authorize, by default the app will call an endpoint at `http://{BACKEND_URL}/{GET_USER_BY_TOKEN_ENDPOINT}/{token}`. Make sure to have this endpoint and it returns a user object (with name, surname, email, etc)
