{"id":15063738,"url":"https://github.com/datarobot-oss/streamlit-app-base","last_synced_at":"2026-01-02T08:15:39.155Z","repository":{"id":256963951,"uuid":"856945024","full_name":"datarobot-oss/streamlit-app-base","owner":"datarobot-oss","description":"Ready-to-use Streamlit application template for a rapid custom application development","archived":false,"fork":false,"pushed_at":"2025-01-15T15:41:10.000Z","size":47,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-15T17:45:08.999Z","etag":null,"topics":["streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datarobot-oss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-13T14:03:47.000Z","updated_at":"2024-12-24T04:11:24.000Z","dependencies_parsed_at":"2024-09-25T00:06:47.759Z","dependency_job_id":"7e32356f-88a6-44de-b646-a51f54ba6ac3","html_url":"https://github.com/datarobot-oss/streamlit-app-base","commit_stats":null,"previous_names":["datarobot-oss/streamlit-app-base"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datarobot-oss%2Fstreamlit-app-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datarobot-oss%2Fstreamlit-app-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datarobot-oss%2Fstreamlit-app-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datarobot-oss%2Fstreamlit-app-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datarobot-oss","download_url":"https://codeload.github.com/datarobot-oss/streamlit-app-base/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243778999,"owners_count":20346649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["streamlit"],"created_at":"2024-09-25T00:06:40.511Z","updated_at":"2026-01-02T08:15:39.126Z","avatar_url":"https://github.com/datarobot-oss.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Streamlit app base template\n\nIn this repository you will find an empty Streamlit application base template to kickstart custom application development. The Datarobot client is already set up for you to use. It uses the application owner's API key by default.\n\n## Setup\n\nYou can run the app using a custom application or by running the Streamlit app directly. Custom applications can be created either via the NextGen Registry's **Applications** page or by using [DRApps](https://github.com/datarobot/dr-apps/blob/main/README.md).\n\nBe sure to define the required variables for the app to communicate with DataRobot. If you run the app locally or in another environment than a custom application, you'll need to set the env variables. When this app is run via a custom application, the variables are set automatically.\n\n```shell\n#start-app.sh\nexport token=\"$DATAROBOT_API_TOKEN\"  # Your API key, accessed from DataRobot's Developer Tools page\nexport endpoint=\"$DATAROBOT_ENDPOINT\"  # Example: https://app.datarobot.com/api/v2/\n```\n\n## Add and use runtime parameters\n\nTo add runtime parameters, create a `metadata.yaml` file in your application source folder. Here is an example of a `DEPLOYMENT_ID` that creates \nan environment variable called `MLOPS_RUNTIME_PARAM_DEPLOYMENT_ID`:\n\n```yaml\nruntimeParameterDefinitions:\n- fieldName: DEPLOYMENT_ID\n  type: string\n```\n\nOnce this file is part of your application source in DataRobot, it displays the new runtime parameter(s) as part of the\napp configuration.\n\nTo use the parameters, DataRobot recommends you add them via `start-app.sh`. Add the following conditional export before `streamlit run` starts:\n\n```shell\nif [ -n \"$MLOPS_RUNTIME_PARAM_DEPLOYMENT_ID\" ]; then\n  export deployment_id=\"$MLOPS_RUNTIME_PARAM_DEPLOYMENT_ID\"\nfi\n```\n\nYou can now use `os.getenv(\"deployment_id\")` within your application code. DataRobot suggests you add every new environment variable to the `initiate_session_state` function, that way they can be used across the app with ease.\n\n## Streamlit configuration file\n\nThis base template comes with a `config.toml` file in the `src/.streamlit` directory. You can adjust your app preferences in this file ([read more](https://docs.streamlit.io/develop/concepts/configuration/theming)). There are some preset defaults show in the code below.\n\n```toml\n[browser]\ngatherUsageStats = false            # Disables component usage tracking by Streamlit\n\n[theme]\nbase=\"dark\" \nprimaryColor=\"#297ab4\"              # Accent color of user interaction elements (button, checkbox, etc.)\nbackgroundColor=\"#0e1117\"           # Background for the main content area\nsecondaryBackgroundColor=\"#22272b\"  # Background for sidebar and various interactive widgets\n\n[client]\ntoolbarMode = \"minimal\"             # Hides the Streamlit actions from the toolbar (clear cache, rerun, custom themes)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatarobot-oss%2Fstreamlit-app-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatarobot-oss%2Fstreamlit-app-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatarobot-oss%2Fstreamlit-app-base/lists"}