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 like deleting tables exported from models file.

Migrating models to DB

Just like exporting schema to DB the ability to export models directly to you DB has been added to faons from v 0.0.6. You can use the command faons updatemodels which will create, alter or drop tables based on the changes that you make to the models.py in the apps. This command also creates a table called faons_models which will be used to track the table names created from the models.

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.6.tar.gz (7.7 kB view details)

Uploaded Source

File details

Details for the file faons-0.0.6.tar.gz.

File metadata

  • Download URL: faons-0.0.6.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for faons-0.0.6.tar.gz
Algorithm Hash digest
SHA256 f4afa870995b83e27bcde49b56a926939de6df08361eb3860044766c54deb8ea
MD5 b13762d7f0e84376e0c72bf6705a4bdc
BLAKE2b-256 ccb4148c38dd6187604079a53cb2f6a849dc128f32b4ed138f6353540e616512

See more details on using hashes here.

Supported by

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