Wrapper for initializing FastAPI projects - Create Fastapi App
Project description
Create FastAPI App (cfa)
Create and manage FastAPI applications
Quick Tour
Follow these steps to set up a FastAPI project. See the documentation for more details.
Installation
This is a pip package. Thus, the only thing you need to do, is to run:
pip install create-fastapi-app
Usage
To create a new applications at a directory ~/my_fastapi_dir
, run:
cfa ~/my_fastapi_dir
Options
Auth
You can choose from three auth setups:
-
none - no auth (default)
-
self - self-managed auth
cfa ~/my_fastapi_dir --auth=self
Will create a
users
table and auth mechanisms for authorizing requests -
backend - auth managed by other backend
cfa ~/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 theGET_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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for create_fastapi_app-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19c2cf448a0b76fdc719d5a23703d0ead2573a20af130e65a18a55a8988de23e |
|
MD5 | 3d5987b2c79e6a4ca31d444779340664 |
|
BLAKE2b-256 | e9edeef7a7a63bc36183a850e7a0d583a117baa026a7b6b33f2738b7c8753b58 |