Skip to content

rollingsxshi/fastapi-lms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LMS API with FastAPI

Poetry

  • ensure poetry is installed in your system
  • run poetry init in root of project
  • install python packages with poetry add {packageName}

FastAPI

  • run server with uvicorn main:app --reload

Alembic

  • run poetry add alembic
  • run alembic init alembic
  • run alembic revision --autogenerate to generate migration file
  • run alembic upgrade head to run migration to postgres db
  • update migration file that contains enum:
op.add_column('users', sa.Column('role', sa.Enum('teacher', 'student', name='role'), nullable=True))
  • take note of sqlalchemy Enums in migration file

SQLAlchemy

  • check docs for syntax for versions >= 1.4 to use async
  • need to use async compatible driver (asyncpg for postgres)

About

LMS backend built with FastAPI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published