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

Entity Profile

Dependency Diagram

graph TD
  b09f3909_9463_ac2b_f151_88e65f1c9245["create_db_and_tables()"]
  bf1d879a_bdca_717d_bf2c_de98c20ba2ac["tutorial001_an_py310.py"]
  b09f3909_9463_ac2b_f151_88e65f1c9245 -->|defined in| bf1d879a_bdca_717d_bf2c_de98c20ba2ac
  2e19a2e2_773a_4b4e_92ff_b0fb9844b7cd["on_startup()"]
  2e19a2e2_773a_4b4e_92ff_b0fb9844b7cd -->|calls| b09f3909_9463_ac2b_f151_88e65f1c9245
  style b09f3909_9463_ac2b_f151_88e65f1c9245 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

docs_src/sql_databases/tutorial001_an_py310.py lines 21–22

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