init_db() — flask Function Reference
Architecture documentation for the init_db() function in db.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD 813f5ba0_6c90_0b58_99de_666488b7a6b9["init_db()"] 09048b06_50a3_09e1_0ff4_ee97994a3e9b["db.py"] 813f5ba0_6c90_0b58_99de_666488b7a6b9 -->|defined in| 09048b06_50a3_09e1_0ff4_ee97994a3e9b 3d398e62_31be_1eab_164d_0133e3c80bf3["init_db_command()"] 3d398e62_31be_1eab_164d_0133e3c80bf3 -->|calls| 813f5ba0_6c90_0b58_99de_666488b7a6b9 adc04a87_eacf_cc39_8808_98d7d38c7044["get_db()"] 813f5ba0_6c90_0b58_99de_666488b7a6b9 -->|calls| adc04a87_eacf_cc39_8808_98d7d38c7044 style 813f5ba0_6c90_0b58_99de_666488b7a6b9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
examples/tutorial/flaskr/db.py lines 33–38
def init_db():
"""Clear existing data and create new tables."""
db = get_db()
with current_app.open_resource("schema.sql") as f:
db.executescript(f.read().decode("utf8"))
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does init_db() do?
init_db() is a function in the flask codebase, defined in examples/tutorial/flaskr/db.py.
Where is init_db() defined?
init_db() is defined in examples/tutorial/flaskr/db.py at line 33.
What does init_db() call?
init_db() calls 1 function(s): get_db.
What calls init_db()?
init_db() is called by 1 function(s): init_db_command.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free