Results of 1 - 1 of about 1 for sqlite (0.006 sec.)
- SQL (Relational) Databases 9414
- SQL (Relational) Databases Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . FastAPI doesn't require you to use a SQL (relational) database. But you can use any data
...can easily use any database supported by SQLAlchemy (which makes them also supported by SQLModel), like: PostgreSQL MySQL SQLite Oracle Microsoft SQL Server, etc. In this example, we'll use SQLite , because it uses a single file and Python has integra...= True ) name : str = Field ( index = True ) age : int | None = Field ( default = None , index = True ) secret_name : str sqlite_file_name = "database.db" sqlite_url = f "sqlite:/// { sqlite_file_name } " connect_args = { "check_same_thread" : False }...engine = create_engine ( sqlite_url , connect_args = connect_args ) def create_db_and_tables (): SQLModel . metadata . create_all ( engine ) def get_sessi... - https://man.mtool.work/fastapi/0.115/tutorial/sql-databases/
PREV
1
NEXT