A starter boiler plate pack for developing apllications endpoints with FAST API. This Boilerplate has basics utililities needed for building REST APIs without much hassle and saves the user some development hassle.
- Registration
- User Login
- CORS
- Reset Password
- Forgot Password
- Authentication and Protected Routes (JWT)
- Getting Autheticated User Details
- Google Authentication
- Email/Account Verification
- Edit Account/Profile
- Email Sending
- Password hashing
- User Account hashing
- File Upload and Download
git clone https://github.com/GeniusGeeek/fastapi-starter-boiler-plate.git
#Python 3.6 and greater
In project directory run the following two commands to create a virtual environment
pip3 install --upgrade pip
python3 -m venv .env
source .env/bin/activate
- Install fastapi and uvicorn server:
pip3 install "fastapi[all]"
- Install SQLAlchemy for ORM management
pip3 install SQLAlchemy
- Install Mysql connection for python
pip3 install mysql-connector-python
- Install Alembic for Database Migrations
pip3 install alembic
- Install other Requirements
pip3 install -r requirements.txt
-
Create database for application: eg. fastapi_starter_pack note: (do not create tables,running migrations will do that)
-
Run database migrations
alembic revision --autogenerate -m "initial setup"
alembic upgrade head
-
OPTIONAL: change DB url definations in database_conn.py and alembic.ini if needed according to your db name and settings
-
Run Application
uvicorn main:app --reload
-
visit url in browser
127.0.0.1:8000,
127.0.0.1:8000/docs