r/FastAPI • • May 30 '21

Question question about fastapi and sqlalchemy

i am new to the SQLalchemy and fastapi libraries and i wonder if we can use sqlalchemy directly to connect to a database without the fastapi ? if no why ? i mean why would i add a third party in my connection to the database if i can read and put data using only sqlalchemy ?

reminder : i am new to working with apis and databases with python and i am working on a project with fastapi and sqlalchemy used

0 Upvotes

3 comments sorted by

View all comments

1

u/FairPassion21 May 31 '21

If your project is about web API then, you would need FastAPI rather than sqlalchemy. I create APIs and i prefer to not use ORM but native SQL with some added security. So i dont use sqlalchemy but i can use database.