{"id":15658435,"url":"https://github.com/snehankekre/st-codespaces","last_synced_at":"2025-05-01T09:56:11.514Z","repository":{"id":139420610,"uuid":"503621887","full_name":"snehankekre/st-codespaces","owner":"snehankekre","description":"Template to run Streamlit apps on GitHub Codespaces","archived":false,"fork":false,"pushed_at":"2023-09-29T04:58:58.000Z","size":9,"stargazers_count":28,"open_issues_count":1,"forks_count":65,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-01T09:55:47.451Z","etag":null,"topics":["codespaces","streamlit"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snehankekre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-15T05:04:05.000Z","updated_at":"2025-03-05T07:53:56.000Z","dependencies_parsed_at":"2024-10-23T05:48:02.368Z","dependency_job_id":null,"html_url":"https://github.com/snehankekre/st-codespaces","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snehankekre%2Fst-codespaces","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snehankekre%2Fst-codespaces/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snehankekre%2Fst-codespaces/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snehankekre%2Fst-codespaces/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snehankekre","download_url":"https://codeload.github.com/snehankekre/st-codespaces/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251856992,"owners_count":21655119,"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":["codespaces","streamlit"],"created_at":"2024-10-03T13:12:28.770Z","updated_at":"2025-05-01T09:56:11.489Z","avatar_url":"https://github.com/snehankekre.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Run Streamlit on Codespaces\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/snehankekre/st-codespaces?quickstart=1)\n\nFork this repo, add your Streamlit app to it, and run it on GitHub Codespaces. :balloon:\n\n## How it works\n\n- `.devcontainer/devcontainer.json` creates a container with Python 3.10, installs your app dependencies from `requirements.txt`, and launches `streamlit hello`. \n    -  Edit the `postAttachCommand` to launch your app instead of Streamlit Hello. E.g. if your script is `app.py`:\n        ```json\n        \"postAttachCommand\": \"streamlit run app.py\",\n        ```\n- It uses `forwardPorts` to make port `8501` inside the container available locally.\n- Additionally, it sets the following configuration options in `.streamlit/config.toml` so that the app can be run on Codespaces without the addition of command line arguments:\n\n    ```toml\n    [server]\n    enableCORS = false\n    enableXsrfProtection = false\n    ```\n\n## Example usage\n\nFork this repo, open it on GitHub Codespaces, wait for the container to load, and click the \"Open in browser\" button in the bottom right corner when it appears to open the Hello app:\n\n![st-codespaces](https://github.com/snehankekre/st-codespaces/assets/20672874/9e31e47f-1fce-4213-a973-e7ed1259a480)\n\n\nIf it weren't for the `.streamlit/config.toml` file, you would have had to run the following command:\n\n```bash\nstreamlit hello --server.enableCORS false --server.enableXsrfProtection false\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnehankekre%2Fst-codespaces","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnehankekre%2Fst-codespaces","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnehankekre%2Fst-codespaces/lists"}