INNER CODE UNIT · Python

lookup

modal-labs/modal-client · py/modal/app.py:322

    async def lookup(
        name: str,
        *,
        client: _Client | None = None,
        environment_name: str | None = None,
        create_if_missing: bool = False,
    ) -> "_App":
        """Look up an App with a given name, creating a new App if necessary.

        Note that Apps created through this method will be in a deployed state,
        but they will not have any associated Functions or Classes. This method
        is mainly useful for creating an App to associate with a Sandbox.

        Args:
            name: App name to resolve or create.
            client: Modal client to use; defaults to `Client.from_env()` when omitted.
            environment_name: Optional environment name; defaults to the configured environment.
            create_if_missing: If True, create the app when it does not already exist.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…