{"id":31214343,"url":"https://github.com/justcodeit7/chainlit_101","last_synced_at":"2025-10-08T13:00:03.559Z","repository":{"id":315297351,"uuid":"1058886928","full_name":"JustCodeIt7/Chainlit_101","owner":"JustCodeIt7","description":"Chainlit tutorial code","archived":false,"fork":false,"pushed_at":"2025-09-17T20:05:47.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-17T21:00:54.496Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/JustCodeIt7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-17T17:24:22.000Z","updated_at":"2025-09-17T20:05:50.000Z","dependencies_parsed_at":"2025-09-17T21:01:00.556Z","dependency_job_id":null,"html_url":"https://github.com/JustCodeIt7/Chainlit_101","commit_stats":null,"previous_names":["justcodeit7/chainlit_101"],"tags_count":null,"template":false,"template_full_name":"JustCodeIt7/Python_Template","purl":"pkg:github/JustCodeIt7/Chainlit_101","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustCodeIt7%2FChainlit_101","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustCodeIt7%2FChainlit_101/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustCodeIt7%2FChainlit_101/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustCodeIt7%2FChainlit_101/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JustCodeIt7","download_url":"https://codeload.github.com/JustCodeIt7/Chainlit_101/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustCodeIt7%2FChainlit_101/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278948023,"owners_count":26073748,"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-08T02:00:06.501Z","response_time":56,"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":[],"created_at":"2025-09-21T09:34:48.166Z","updated_at":"2025-10-08T13:00:03.541Z","avatar_url":"https://github.com/JustCodeIt7.png","language":"Python","readme":"# Chainlit 101 - YouTube Series Code\n\nThis repository contains all the code examples for the **Chainlit 101** YouTube tutorial series.\n\n## 📁 Project Structure\n\n```\n01-Core_Concepts/\n├── 01-Hello_world/\n│   └── hello_world.py              # Episode 1: Getting Started \u0026 Hello World\n└── 02-Message_Lifecycle/\n    ├── 2A-Project_Setup/\n    │   └── project_setup.py        # Episode 2A: Project Setup \u0026 File Structure\n    ├── 2B-Events_Overview/\n    │   └── events_lifecycle.py     # Episode 2B: Chainlit Events Overview\n    ├── 2C-On_Chat_Start/\n    │   └── on_chat_start_deep_dive.py  # Episode 2C: Deep Dive into on_chat_start\n    ├── 2D-On_Message/\n    │   └── on_message_deep_dive.py     # Episode 2D: Deep Dive into on_message\n    └── 2E-Multiple_Messages/\n        └── multiple_messages_updates.py # Episode 2E: Multiple Messages \u0026 Updates\n```\n\n## 🚀 Quick Start\n\n### Prerequisites\n```bash\npip install chainlit\n```\n\n### Running the Examples\n\nEach file can be run independently:\n\n```bash\n# Episode 1: Hello World\nchainlit run 01-Core_Concepts/01-Hello_world/hello_world.py\n\n# Episode 2A: Project Setup\nchainlit run 01-Core_Concepts/02-Message_Lifecycle/2A-Project_Setup/project_setup.py\n\n# Episode 2B: Events Overview\nchainlit run 01-Core_Concepts/02-Message_Lifecycle/2B-Events_Overview/events_lifecycle.py\n\n# Episode 2C: on_chat_start Deep Dive\nchainlit run 01-Core_Concepts/02-Message_Lifecycle/2C-On_Chat_Start/on_chat_start_deep_dive.py\n\n# Episode 2D: on_message Deep Dive\nchainlit run 01-Core_Concepts/02-Message_Lifecycle/2D-On_Message/on_message_deep_dive.py\n\n# Episode 2E: Multiple Messages \u0026 Updates\nchainlit run 01-Core_Concepts/02-Message_Lifecycle/2E-Multiple_Messages/multiple_messages_updates.py\n```\n\n## 📚 Episode Guide\n\n### Episode 1: Getting Started with Chainlit\n- **File:** `hello_world.py`\n- **Topics:** Installation, basic setup, first Chainlit app\n- **Key Concepts:** `@cl.on_message`, `@cl.on_chat_start`, basic responses\n- **Lines of Code:** ~92\n\n### Episode 2A: Project Setup \u0026 File Structure\n- **File:** `project_setup.py`\n- **Topics:** Project organization, file structure, configuration\n- **Key Concepts:** Directory layout, `.chainlit/` folder, `public/` assets\n- **Lines of Code:** ~85\n\n### Episode 2B: Chainlit Events Overview\n- **File:** `events_lifecycle.py`\n- **Topics:** Event system, lifecycle management, decorators\n- **Key Concepts:** All major event decorators, session logging, event timing\n- **Lines of Code:** ~180\n\n### Episode 2C: Deep Dive into on_chat_start\n- **File:** `on_chat_start_deep_dive.py`\n- **Topics:** Session initialization, user state, welcome sequences\n- **Key Concepts:** `cl.user_session`, progressive onboarding, data persistence\n- **Lines of Code:** ~285\n\n### Episode 2D: Deep Dive into on_message\n- **File:** `on_message_deep_dive.py`\n- **Topics:** Message routing, content formatting, intelligent responses\n- **Key Concepts:** Command parsing, Markdown formatting, context awareness\n- **Lines of Code:** ~295\n\n### Episode 2E: Multiple Messages \u0026 Updates\n- **File:** `multiple_messages_updates.py`\n- **Topics:** Sequential messages, real-time updates, progress indicators\n- **Key Concepts:** Message chaining, `msg.update()`, UX patterns\n- **Lines of Code:** ~280\n\n## 🎯 Learning Path\n\n1. **Start with Episode 1** - Get Chainlit running and understand the basics\n2. **Episode 2A** - Learn proper project organization\n3. **Episode 2B** - Understand the event system foundation\n4. **Episode 2C** - Master session initialization\n5. **Episode 2D** - Build intelligent message handling\n6. **Episode 2E** - Create engaging user experiences\n\n## 🔧 Key Features Demonstrated\n\n- ✅ Basic Chainlit setup and configuration\n- ✅ Event-driven architecture\n- ✅ Session state management\n- ✅ Message routing and command handling\n- ✅ Rich content formatting (Markdown, code, tables)\n- ✅ Real-time message updates\n- ✅ Progress indicators and loading states\n- ✅ Interactive demos (quizzes, stories, reports)\n- ✅ Professional UX patterns\n\n## 💡 Usage Tips\n\n- Each file is self-contained and can be run independently\n- Check the terminal output for event logging and debugging info\n- All code is under 300 lines per file as requested\n- Examples include extensive comments and documentation\n- Interactive demos are included in most files\n\n## 🤝 Contributing\n\nThis code is designed for educational purposes. Feel free to:\n- Modify examples for your own learning\n- Extend functionality with additional features\n- Use as a foundation for your own Chainlit projects\n\n## 📖 Additional Resources\n\n- [Chainlit Documentation](https://docs.chainlit.io)\n- [Chainlit GitHub](https://github.com/Chainlit/chainlit)\n- [Python AsyncIO Documentation](https://docs.python.org/3/library/asyncio.html)\n\n---\n\n**Happy coding!** 🚀 Each example builds upon the previous ones, so follow the episode order for the best learning experience.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustcodeit7%2Fchainlit_101","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustcodeit7%2Fchainlit_101","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustcodeit7%2Fchainlit_101/lists"}