Make sure you have the following prequisites installed on your development environment:
- FastAPI:
pip install "fastapi[all]"
- Web server: Fastapi makes use of uvicorn to run a development server locally.
pip install uvicorn[standard]
- Database: FastAPI supports both relational and Non-relationship Databases such as MongoDB, MySQL, Postgres, SQLAlchemy and SQLite. SQLAlchemy is used in this project to set up the database.
pip install sqlalchemy
-
Git: Git is a version control System used for manageing the project's source code.
Follow these steps to clone and prepare the application
- Open your terminal and follow the following instructions:
git clone https://github.com/Conradgabe/crudAPI-fastapi.git
change your working directory to the cloned project folder
cd crudAPI-fastapi
pip install -r requirements.txt
uvicorn restapi.main:app --reload
and wait a few seconds for it to run
http://127.0.0.1:8000/docs
This will take you to the api documentation where you can test and use the api locally