The FastAPI SQL database tutorial modified to use mssql+pyodbc
.
Proof-of-concept that using FastAPI with mssql does not require
aioodbc and async def
for path operation functions.
To launch uvicorn:
uvicorn sql_app.main:app --reload
Then load the fancy interactive docs page at
Details at
https://fastapi.tiangolo.com/tutorial/
and
https://fastapi.tiangolo.com/tutorial/sql-databases/
GitHub discussion:
Notes:
- You may need to tweak
SQLALCHEMY_DATABASE_URL
in database.py to connect to your SQL Server instance.