name() — flask Function Reference
Architecture documentation for the name() function in app.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD a69c4070_6705_508c_e8c3_a713102a2f63["name()"] 38f6d4a2_834e_2acd_e1b6_f45c58079ccd["App"] a69c4070_6705_508c_e8c3_a713102a2f63 -->|defined in| 38f6d4a2_834e_2acd_e1b6_f45c58079ccd style a69c4070_6705_508c_e8c3_a713102a2f63 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/flask/sansio/app.py lines 423–437
def name(self) -> str:
"""The name of the application. This is usually the import name
with the difference that it's guessed from the run file if the
import name is main. This name is used as a display name when
Flask needs the name of the application. It can be set and overridden
to change the value.
.. versionadded:: 0.8
"""
if self.import_name == "__main__":
fn: str | None = getattr(sys.modules["__main__"], "__file__", None)
if fn is None:
return "__main__"
return os.path.splitext(os.path.basename(fn))[0]
return self.import_name
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does name() do?
name() is a function in the flask codebase, defined in src/flask/sansio/app.py.
Where is name() defined?
name() is defined in src/flask/sansio/app.py at line 423.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free