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 tutorial001_py310.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  b6d9b483_ed10_7d77_0d18_67a186719c26["create_db_and_tables()"]
  41dd859f_0739_ad21_3512_3eebb3d81f0b["tutorial001_py310.py"]
  b6d9b483_ed10_7d77_0d18_67a186719c26 -->|defined in| 41dd859f_0739_ad21_3512_3eebb3d81f0b
  9c64ae91_580f_7d00_2a4f_e169b3b6d591["on_startup()"]
  9c64ae91_580f_7d00_2a4f_e169b3b6d591 -->|calls| b6d9b483_ed10_7d77_0d18_67a186719c26
  style b6d9b483_ed10_7d77_0d18_67a186719c26 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

docs_src/sql_databases/tutorial001_py310.py lines 19–20

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/tutorial001_py310.py.
Where is create_db_and_tables() defined?
create_db_and_tables() is defined in docs_src/sql_databases/tutorial001_py310.py at line 19.
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