Home / Function/ __init__() — flask Function Reference

__init__() — flask Function Reference

Architecture documentation for the __init__() function in blueprints.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  a467deec_dbd2_7e8e_b9aa_7ad579be0b52["__init__()"]
  43802377_8224_2289_2f49_1129adf043ee["Blueprint"]
  a467deec_dbd2_7e8e_b9aa_7ad579be0b52 -->|defined in| 43802377_8224_2289_2f49_1129adf043ee
  style a467deec_dbd2_7e8e_b9aa_7ad579be0b52 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/flask/blueprints.py lines 19–53

    def __init__(
        self,
        name: str,
        import_name: str,
        static_folder: str | os.PathLike[str] | None = None,
        static_url_path: str | None = None,
        template_folder: str | os.PathLike[str] | None = None,
        url_prefix: str | None = None,
        subdomain: str | None = None,
        url_defaults: dict[str, t.Any] | None = None,
        root_path: str | None = None,
        cli_group: str | None = _sentinel,  # type: ignore
    ) -> None:
        super().__init__(
            name,
            import_name,
            static_folder,
            static_url_path,
            template_folder,
            url_prefix,
            subdomain,
            url_defaults,
            root_path,
            cli_group,
        )

        #: The Click command group for registering CLI commands for this
        #: object. The commands are available from the ``flask`` command
        #: once the application has been discovered and blueprints have
        #: been registered.
        self.cli = AppGroup()

        # Set the name of the Click group in case someone wants to add
        # the app's commands to another CLI tool.
        self.cli.name = self.name

Subdomains

Frequently Asked Questions

What does __init__() do?
__init__() is a function in the flask codebase, defined in src/flask/blueprints.py.
Where is __init__() defined?
__init__() is defined in src/flask/blueprints.py at line 19.

Analyze Your Own Codebase

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

Try Supermodel Free