App
Represents a web application or a dashboard deployment on Datatailr.
This could be a Streamlit app, Dash app, or any other web-based data application.
The implementation of the app does not need to follow any specific framework, as long as it can be started
in the standard way (e.g., streamlit run app.py).
Example:
# app.py
import streamlit as st
def main():
st.title("Hello Datatailr App")
if __name__ == "__main__":
main()
streamlit run app.py
To deploy the app to Datatailr, you would create an App job in your Python code:
from app import main
from datatailr import App
app = App(
name="Simple Dashboard App",
entrypoint=main,
python_requirements="streamlit")
app.run()
https://YOUR-DOMAIN.datatailr.com/job-details/simple-dashboard-app/1/dev/definition
The deployed app can be accessed by all users with the appropriate permissions from the app launcher page or directly via its URL:
https://YOUR-DOMAIN.datatailr.com/job/dev/simple-dashboard-app/
__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={}, update_existing=False)
Initialize an App deployment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Display name for the app. |
required |
entrypoint
|
Callable
|
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
|
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 |
''
|
build_script_pre
|
str
|
Dockerfile commands to run before installing requirements. |
''
|
build_script_post
|
str
|
Dockerfile commands to run after installing requirements. |
''
|
env_vars
|
Dict[str, str | int | float | bool]
|
Environment variables passed to the running container. |
{}
|
update_existing
|
bool
|
If |
False
|