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 Type Description Default
name str

App display name.

required
entrypoint Callable | str

Callable that starts the app server.

required
environment Optional[Environment]

Target environment for the job.

DEV
image Optional[Image]

Container image to use for execution.

None
run_as Optional[Union[str, User]]

User to execute the job as.

None
resources Resources

Resource requirements for the job.

Resources()
acl Optional[ACL]

Access control settings for the job.

None
framework Optional[str]

Framework to use for the app.

None
python_version str

Python version to use.

'3.12'
python_requirements str | List[str]

Requirements to install (string or list).

''
build_script_pre str

Shell script to run before build.

''
build_script_post str

Shell script to run after build.

''
env_vars Optional[Dict[str, str | int | float | bool]]

Environment variables to set.

None
update_existing bool

Update an existing job with the same name.

False

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()

__init__(name, entrypoint, environment=Environment.DEV, image=None, run_as=None, resources=Resources(), acl=None, framework=None, python_version='3.12', python_requirements='', build_script_pre='', build_script_post='', env_vars=None, update_existing=False, app_section='')

Initialize an App deployment.

Parameters:

Name Type Description Default
name str

Display name for the app.

required
entrypoint Callable | str

The callable (function) that starts the application.

required
environment Optional[Environment]

Target environment for the deployment.

DEV
image Optional[Image]

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

None
run_as Optional[Union[str, User]]

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

None
resources Resources

CPU and memory resources for the container.

Resources()
acl Optional[ACL]

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

None
framework Optional[str]

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

None
python_version str

Python version for the container image.

'3.12'
python_requirements str | List[str]

Python dependencies (see Image).

''
build_script_pre str

Dockerfile commands to run before installing requirements.

''
build_script_post str

Dockerfile commands to run after installing requirements.

''
env_vars Optional[Dict[str, str | int | float | bool]]

Environment variables passed to the running container.

None
update_existing bool

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

False
app_section str

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.

''