Skip to content

App

Deploy a web application or dashboard to Datatailr.

This supports Streamlit, Dash, or any framework that can be started via a standard entrypoint (for example, streamlit run app.py).

Parameters:

  • name

    (str) –

    App display name.

  • entrypoint

    (Callable | str) –

    Callable that starts the app server.

  • environment

    (Environment | None, default: DEV ) –

    Target environment for the job.

  • image

    (Image | None, default: None ) –

    Container image to use for execution.

  • run_as

    (str | User | None, default: None ) –

    User to execute the job as.

  • resources

    (Resources, default: Resources() ) –

    Resource requirements for the job.

  • acl

    (ACL | None, default: None ) –

    Access control settings for the job.

  • framework

    (str | None, default: None ) –

    Framework to use for the app.

  • python_version

    (str, default: '3.12' ) –

    Python version to use.

  • python_requirements

    (str | List[str], default: '' ) –

    Requirements to install (string or list).

  • build_script_pre

    (str, default: '' ) –

    Shell script to run before build.

  • build_script_post

    (str, default: '' ) –

    Shell script to run after build.

  • env_vars

    (dict[str, str | int | float | bool] | None, default: None ) –

    Environment variables to set.

  • get_existing

    (bool, default: False ) –

    Update an existing job with the same name.

Examples:

Minimal Streamlit app.

# app.py
import streamlit as st

def main():
    st.title("Hello Datatailr App")

if __name__ == "__main__":
    main()

Test locally.

streamlit run app.py

Deploy to Datatailr.

from app import main
from datatailr import App

app = App(
    name="Simple Dashboard App",
    entrypoint=main,
    python_requirements="streamlit")

app.run()

Parameters:

  • name

    (str) –

    Display name for the app.

  • entrypoint

    (Callable | str) –

    The callable (function) that starts the application.

  • environment

    (Environment | None, default: DEV ) –

    Target environment for the deployment.

  • image

    (Image | None, default: None ) –

    Pre-configured container Image. When None, an image is built from python_version, python_requirements, and the build scripts.

  • run_as

    (str | User | None, default: None ) –

    User or username to run the app as. Defaults to the currently signed-in user.

  • resources

    (Resources, default: Resources() ) –

    CPU and memory resources for the container.

  • acl

    (ACL | None, default: None ) –

    Access control list. Defaults to standard permissions for the current user.

  • framework

    (str | None, default: None ) –

    Optional framework name (e.g., 'streamlit', 'dash', 'flask'). If not provided, the framework is inferred from the entrypoint.

  • python_version

    (str, default: '3.12' ) –

    Python version for the container image.

  • python_requirements

    (str | List[str], default: '' ) –

    Python dependencies (see Image).

  • build_script_pre

    (str, default: '' ) –

    Dockerfile commands to run before installing requirements.

  • build_script_post

    (str, default: '' ) –

    Dockerfile commands to run after installing requirements.

  • env_vars

    (dict[str, str | int | float | bool] | None, default: None ) –

    Environment variables passed to the running container.

  • get_existing

    (bool, default: False ) –

    If True, load and update an existing job definition with the same name instead of creating a new one.

  • app_section

    (str, default: '' ) –

    The section to which the app belongs. If not provided, the app will be assigned to the default section. This affects the app launcher page.

  • budget

    (Budget | str | None, default: None ) –

    Optional spend budget as Budget("name") or a name str. Will be set to the 'default' budget if not provided.