Home / Function/ create_db_and_tables() — fastapi Function Reference

create_db_and_tables() — fastapi Function Reference

Architecture documentation for the create_db_and_tables() function in tutorial002_an_py310.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  78439524_3527_1337_0aa4_c8fb8b933b22["create_db_and_tables()"]
  912f624b_462d_a11f_1865_05f241dc3619["tutorial002_an_py310.py"]
  78439524_3527_1337_0aa4_c8fb8b933b22 -->|defined in| 912f624b_462d_a11f_1865_05f241dc3619
  d1eab78f_71a4_c4c8_e1b9_f5a56478fc58["on_startup()"]
  d1eab78f_71a4_c4c8_e1b9_f5a56478fc58 -->|calls| 78439524_3527_1337_0aa4_c8fb8b933b22
  style 78439524_3527_1337_0aa4_c8fb8b933b22 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

docs_src/sql_databases/tutorial002_an_py310.py lines 38–39

def create_db_and_tables():
    SQLModel.metadata.create_all(engine)

Domain

Subdomains

Called By

Frequently Asked Questions

What does create_db_and_tables() do?
create_db_and_tables() is a function in the fastapi codebase, defined in docs_src/sql_databases/tutorial002_an_py310.py.
Where is create_db_and_tables() defined?
create_db_and_tables() is defined in docs_src/sql_databases/tutorial002_an_py310.py at line 38.
What calls create_db_and_tables()?
create_db_and_tables() is called by 1 function(s): on_startup.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free