Skip to main content

No project description provided

Project description

Welcome to Fast API on Steroids(FAONS)!

Hi! we have created faons to help those who are struggling to setup a base project for fast api with swagger ui. My team used to either copy paste or create manually the files and folders necessary for fast api. But with this package anyone can easily start a fast api project.

Installing

Use the command pip install faons to install the latest version of faons in your environment.

Creating your first project

Once the package has been installed you can create your first project using the command faons intializeproject <project_name>.

File structure

All your files and folders are created as per the below representation

├── src
│   ├── config
│   │   ├── config.py
|   |   └── constants.py
│   ├── core
│   ├── logger
├── conf
│   ├── __init__.py
│   ├── env.conf
├── utils.py
├── settings.py
├── main.py 
└── README.md

The main.py file will be responsible for running your application. The settings.py file will be used for including the settings (eg: database connections) for the application. The utils.py contains the necessary utilities to run the application.

Creating you first app for your project

FAONS inherit the idea of creating apps from Django. We will be creating different apps to separate different modules in our application. We can create apps by using the command faons startapp <app_name> . Once done the app folder will be created inside the src/core folder.

Updating your schema to the DB

One useful feature that we missed while coming from django to fastapi was that it lacked the feature to migrate the schema to its db easily. With faons v 0.0.4 we included a function do exactly the same thing. You can use the command faons updateschema which will create, alter or drop tables based on the changes that you make to the schema.py in the apps. From faons v 0.0.5 we started to create an additional table faons_schema which will be used to track the table names. This table was included to avoid issues due to an upcoming feature to export models to db like exporting schema.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

faons-0.0.5.tar.gz (5.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page