Skip to content

sieunhantanbao/fastapi-todo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TODO APIs with FastAPI

A practical Todo Restful API with Python FastAPI

Set up and run the Application

Prerequisite

Clone the source code

> mkdir myfastapi
> cd myfastapi
> git clone https://github.com/sieunhantanbao/fastapi-todo.git
> cd fastapi-todo
> py -3 -m venv .venv
> .venv\Scripts\activate

Install dependency packages

> pip install -r requirements.txt
> cd app

Install requirements

Rename the sample.env to .env and update the configuration

DB_ENGINE=postgresql
DB_HOST=
DB_USERNAME=
DB_PASSWORD=
DB_PORT=
DB_NAME=sample.db
JWT_SECRET=
JWT_ALGORITHM=HS256

Create Postgresql database name to match with the DB_NAME above

Run the database migration

> alembic upgrade head

Db migration

Run the app

> uvicorn main:app --reload

Run the app

View the app (swagger) on browser

View the app

About

A practical Todo Restful API with Python FastAPI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages