{"id":28961461,"url":"https://github.com/tonykipkemboi/streamlit_pycon24_tutorial","last_synced_at":"2025-10-06T01:33:02.480Z","repository":{"id":239619624,"uuid":"798388543","full_name":"tonykipkemboi/streamlit_pycon24_tutorial","owner":"tonykipkemboi","description":"Streamlit tutorial presentation for PyCon 2024","archived":false,"fork":false,"pushed_at":"2024-08-12T19:23:12.000Z","size":1968,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-09T12:53:09.588Z","etag":null,"topics":["github","llamaindex","pycon","pycon2024","streamlit"],"latest_commit_sha":null,"homepage":"https://pycon24tutorial.streamlit.app/","language":"Python","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/tonykipkemboi.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":"2024-05-09T17:17:02.000Z","updated_at":"2025-03-22T20:16:02.000Z","dependencies_parsed_at":"2024-05-18T13:45:07.134Z","dependency_job_id":null,"html_url":"https://github.com/tonykipkemboi/streamlit_pycon24_tutorial","commit_stats":null,"previous_names":["tonykipkemboi/streamlit_pycon24_tutorial"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tonykipkemboi/streamlit_pycon24_tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonykipkemboi%2Fstreamlit_pycon24_tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonykipkemboi%2Fstreamlit_pycon24_tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonykipkemboi%2Fstreamlit_pycon24_tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonykipkemboi%2Fstreamlit_pycon24_tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tonykipkemboi","download_url":"https://codeload.github.com/tonykipkemboi/streamlit_pycon24_tutorial/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonykipkemboi%2Fstreamlit_pycon24_tutorial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278547774,"owners_count":26004772,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["github","llamaindex","pycon","pycon2024","streamlit"],"created_at":"2025-06-24T02:03:36.567Z","updated_at":"2025-10-06T01:33:02.461Z","avatar_url":"https://github.com/tonykipkemboi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advanced Streamlit for Python Developers: A PyCon US `24 Tutorial\n\n_By [Caroline Frasca](https://us.pycon.org/2024/speaker/profile/89/) and [Tony Kipkemboi](https://us.pycon.org/2024/speaker/profile/90/)_\n\nThis repository hosts the code for the Advanced Streamlit for Python Developers PyCon US 2024 tutorial talk that will take place in Pittsburgh, PA.\n\nStreamlit is a faster way to build and share data apps. Streamlit turns data scripts into shareable web apps in minutes. All in pure Python. No front-end experience required.\n\nCheck out our [docs](https://docs.streamlit.io/) to get started!\n\n## 🚀 Getting Started\n\nTo run the GitHub Repository Analytics Dashboard locally, follow these steps:\n\n1. Clone the repository:\n\n   ```md\n   git clone https://github.com/tonykipkemboi/streamlit_pycon24_tutorial.git\n   ```\n\n2. Navigate to the project directory:\n\n   ```md\n   cd streamlit_pycon24_tutorial\n   ```\n\n3. Set up your OpenAI API key:\n\n   - Create a file named `.streamlit/secrets.toml` in the project directory (see example file in `.streamlit/example_secrets.toml`)\n   - Add your OpenAI API key to the file in the following format:\n\n     ```md\n     OPENAI_API_KEY = \"your_api_key_here\"\n     ```\n\n4. Install the required dependencies:\n\n   ```md\n   pip install -r requirements.txt\n   ```\n\n5. Run the Streamlit app:\n\n   ```md\n   streamlit run 01_📈_Repository_analytics.py\n   ```\n\n6. Open your web browser and visit `http://localhost:8501` to access the dashboard.\n\n## 📂 Repository Structure\n\nThe repository contains the following files:\n\n- `01_📈_Repository_analytics.py`: The main Streamlit app file that contains the code for the Streamlit GitHub Repository Analytics Dashboard.\n- `02_💬_Chat_with_the_Streamlit_docs.py`: A chatbot app that demonstrates how to chat with the Streamlit documentation using LlamaIndex and OpenAI.\n- `data/`: Directory containing the CSV files used for data analysis.\n- `docs/`: Directory containing the Streamlit documentation files for the chat app.\n- `requirements.txt`: File listing the required Python dependencies.\n\n## 📊 Features\n\n### 1. GitHub Repository Analytics Dashboard\n\nThe GitHub Repository Analytics Dashboard provides the following features:\n\n- ⏰ **Code Frequency**: Visualize code changes over time, including weekly code changes comparison and cumulative code changes.\n- 📬 **Commit Activity**: Track the total number of commits, average weekly commits, and week-over-week change.\n- 👩‍💻 **Contributors**: Analyze contributors and their activity, view contributions over time for selected users, and explore filtered data.\n\n### 2. Chat with the Streamlit Docs\n\nA chat app that allows you to interact with the Streamlit documentation using natural language queries. Features include:\n\n- 💬 **Streamlit UI**: Ask questions about Streamlit's open-source Python library using natural language and get responses from the LLM.\n- 🧠 **Powered by LlamaIndex**: The chat app leverages [LlamaIndex](https://www.llamaindex.ai/?gad_source=1\u0026gclid=CjwKCAjwrvyxBhAbEiwAEg_Kgvh_e5ZuJINu47FgMRntEWXEtO6an_TCqXmVJs0P9XeKUohTtSuexhoCCaIQAvD_BwE) to efficiently search and retrieve relevant information from the Streamlit documentation.\n- 🤖 **OpenAI Integration**: The app uses OpenAI's GPT-3.5-turbo model to generate human-like responses based on the retrieved information.\n\n## 💡 Tutorial\n\nBy following this tutorial, you'll learn how to:\n\n- Set up a Streamlit app and create tabs for different analytics views\n- Implement a data loading function to handle CSV files\n- Create visualizations for code frequency, commit activity, and contributor analysis\n- Interact with the dashboard using sliders, dropdowns, and expandable sections\n- Customize the app's appearance and layout\n- Use the latest Streamlit feature `@st.experimental_fragment`; a new decorator that turns any function into a \"fragment\" that can run independently of the wider page\n\n## 📧 Contact\n\nIf you have any questions or feedback, feel free to reach out to us in the [Streamlit forum](https://discuss.streamlit.io/). We'd love to hear from you! 💬\n\nHappy Streamlit-ing! 🎈\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonykipkemboi%2Fstreamlit_pycon24_tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftonykipkemboi%2Fstreamlit_pycon24_tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonykipkemboi%2Fstreamlit_pycon24_tutorial/lists"}