snowflake.core.streamlit.Streamlit

class snowflake.core.streamlit.Streamlit(*, name: Annotated[str, Strict(strict=True)], comment: Annotated[str, Strict(strict=True)] | None = None, imports: List[Annotated[str, Strict(strict=True)]] | None = None, external_access_integrations: List[Annotated[str, Strict(strict=True)]] | None = None, external_access_secrets: Annotated[str, Strict(strict=True)] | None = None, title: Annotated[str, Strict(strict=True)] | None = None, main_file: Annotated[str, Strict(strict=True)] | None = None, query_warehouse: Annotated[str, Strict(strict=True)] | None = None, default_version: Annotated[str, Strict(strict=True)] | None = None, created_on: datetime | None = None, default_version_details: VersionDetailsStreamlit | None = None, last_version_details: VersionDetailsStreamlit | None = None, database_name: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])] | None = None, schema_name: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])] | None = None, owner: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])] | None = None, owner_role_type: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])] | None = None, source_location: Annotated[str, Strict(strict=True)] | None = None, url_id: Annotated[str, Strict(strict=True)] | None = None, default_packages: List[Annotated[str, Strict(strict=True)]] | None = None, user_packages: List[Annotated[str, Strict(strict=True)]] | None = None, live_version_location_uri: Annotated[str, Strict(strict=True)] | None = None)

Bases: BaseModel

A model object representing the Streamlit resource.

Constructs an object of type Streamlit with the provided properties.

Parameters:
  • name (str) – Name of the Streamlit

  • comment (str, optional) – Optional description of the Streamlit app, used for documentation or metadata purposes

  • imports (list[str], optional) – List of files to be imported from a stage.

  • external_access_integrations (list[str], optional) – List of external access integrations needed in order for the Streamlit app code to access external networks.

  • external_access_secrets (str, optional) – Secrets needed for the Streamlit app code to access external networks.

  • title (str, optional) – User-facing title of the Streamlit app.

  • main_file (str, optional) – Name and path of the entry file for the Streamlit app

  • query_warehouse (str, optional) – Warehouse used to run queries issued by the Streamlit app

  • default_version (str, optional) – The default version name of Streamlit. Valid values are “first” (first version), “last” (latest version), or “version$N” (specific version, e.g., “version$1”). Custom names are not supported.

  • created_on (datetime, optional) – Date and time when the Streamlit was created.

  • default_version_details (VersionDetailsStreamlit, optional)

  • last_version_details (VersionDetailsStreamlit, optional)

  • database_name (str, optional) – Database in which the Streamlit is stored

  • schema_name (str, optional) – Schema in which the Streamlit is stored

  • owner (str, optional) – Role that owns the Streamlit

  • owner_role_type (str, optional) – The type of role that owns the Streamlit

  • source_location (str, optional) – The stage from which the source files are copied to initialize the Streamlit app.

  • url_id (str, optional) – A unique ID associated with the Streamlit object’s URL.

  • default_packages (list[str], optional) – Default Python packages for Streamlit apps.

  • user_packages (list[str], optional) – Python packages specified in the environment.yml file.

  • live_version_location_uri (str, optional) – The location of the Streamlit object’s live version files.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Methods

classmethod from_dict(obj: dict) Streamlit

Create an instance of Streamlit from a dict.

classmethod from_json(json_str: str) Streamlit

Create an instance of Streamlit from a JSON string.

to_dict(hide_readonly_properties: bool = False) dict[str, Any]

Returns the dictionary representation of the model using alias.

to_dict_without_readonly_properties() dict[str, Any]

Return the dictionary representation of the model without readonly properties.

to_json() str

Returns the JSON representation of the model using alias.

to_str() str

Returns the string representation of the model using alias.