Home / Function/ on_startup() — fastapi Function Reference

on_startup() — fastapi Function Reference

Architecture documentation for the on_startup() function in tutorial002_an_py39.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  6c896ed4_d333_c372_4d3f_5479033beab4["on_startup()"]
  de4b5dc2_6a42_bcea_3d1b_550a5d21248e["tutorial002_an_py39.py"]
  6c896ed4_d333_c372_4d3f_5479033beab4 -->|defined in| de4b5dc2_6a42_bcea_3d1b_550a5d21248e
  0ea2061e_dff3_0a4e_15f0_b1b4c67e4899["create_db_and_tables()"]
  6c896ed4_d333_c372_4d3f_5479033beab4 -->|calls| 0ea2061e_dff3_0a4e_15f0_b1b4c67e4899
  style 6c896ed4_d333_c372_4d3f_5479033beab4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

docs_src/sql_databases/tutorial002_an_py39.py lines 52–53

def on_startup():
    create_db_and_tables()

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free