{"id":27262823,"url":"https://github.com/strickvl/geminibyexample","last_synced_at":"2025-06-12T17:04:14.165Z","repository":{"id":286260686,"uuid":"959936270","full_name":"strickvl/geminibyexample","owner":"strickvl","description":"Source code for the website geminibyexample.com which provides simple Python code examples for the Gemini SDK","archived":false,"fork":false,"pushed_at":"2025-04-08T15:41:24.000Z","size":1186,"stargazers_count":18,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T05:58:02.599Z","etag":null,"topics":["documentation","gemini","gemini-ai","gemini-api","google-gemini"],"latest_commit_sha":null,"homepage":"https://geminibyexample.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/strickvl.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":"2025-04-03T15:36:07.000Z","updated_at":"2025-04-08T15:41:28.000Z","dependencies_parsed_at":"2025-04-05T10:36:50.248Z","dependency_job_id":null,"html_url":"https://github.com/strickvl/geminibyexample","commit_stats":null,"previous_names":["strickvl/geminibyexample"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strickvl%2Fgeminibyexample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strickvl%2Fgeminibyexample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strickvl%2Fgeminibyexample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strickvl%2Fgeminibyexample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/strickvl","download_url":"https://codeload.github.com/strickvl/geminibyexample/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248351393,"owners_count":21089271,"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":["documentation","gemini","gemini-ai","gemini-api","google-gemini"],"created_at":"2025-04-11T05:58:04.801Z","updated_at":"2025-04-11T05:58:05.222Z","avatar_url":"https://github.com/strickvl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gemini by Example\n\nA hands-on introduction to using the Google Gemini API through annotated example programs.\n\n## Overview\n\nGemini by Example provides step-by-step tutorials for learning how to use the Gemini API in Python. The project features:\n\n- Simple, commented examples that build from basic to advanced usage\n- Side-by-side code and explanations\n- Runnable shell commands with expected outputs\n- Examples organized by category\n- Support for images to illustrate concepts\n\n## Project Structure\n\n```\ngeminibyexample/\n├── data/               # Processed data files\n│   ├── examples.json   # Structured example data\n│   └── sections.json   # Section definitions for organizing examples\n├── examples/           # Source examples\n│   ├── 001-basic-generation/\n│   │   ├── basic-generation.py  # Python code with comments\n│   │   ├── basic-generation.sh  # Shell commands and output\n│   │   └── basic-generation.png # Optional example image\n│   ├── 002-streaming-text/\n│   └── ...\n├── build_examples/     # Scripts to build data files\n│   └── build_examples.py\n├── build_static_site.py # Generate static HTML site\n├── docs/               # Generated static site (GitHub Pages)\n│   ├── llms.txt        # Simplified documentation with links\n│   ├── llms-ctx.txt    # Comprehensive documentation with code\n│   └── ...\n├── templates/          # Site templates\n└── static/             # Static assets\n```\n\n## Quickstart\n\nTo build and preview the site locally:\n\n```bash\n# One command to build both examples data and static site\npython build_static_site.py\n\n# Open the generated site\nopen docs/index.html\n```\n\n## Features\n\n- **Organized Sections**: Examples are grouped into logical sections\n- **Copy All Python**: Each example has a \"Copy All Python\" button to easily copy the complete code\n- **Annotated Code**: Line-by-line explanations paired with code\n- **Visual Examples**: Support for images to illustrate concepts\n- **Shell Commands**: Example commands with expected output\n- **AI-Ready Documentation**: Generated files (`llms.txt` and `llms-ctx.txt`) that can be used as context in AI coding tools\n- **Keyboard Navigation**: Use arrow keys to move between examples\n\n## Working with Examples\n\nExamples are Python files with special comment formatting:\n\n```python\n# Title of the Example\n# This is a description of what this example demonstrates.\n\n# This is a comment that explains the next line of code\ncode_here()\n\n# Another explanation\nmore_code()\n```\n\n- The first comment block becomes the title and description\n- Each comment block explains the code that follows it\n- Comments without following code create section headers\n\nFor detailed instructions on creating new examples, see [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Building the Site\n\nBuild both the examples data and static site with a single command:\n\n```bash\npython build_static_site.py\n```\n\nThis will:\n1. Process all examples and create `data/examples.json`\n2. Generate the static site in the `docs/` directory\n3. Copy all assets and images\n4. Generate two documentation files:\n   - `llms.txt`: A simplified summary with links to examples\n   - `llms-ctx.txt`: Comprehensive documentation with full code examples\n\nThese text files are useful for context injection into AI tools like Cursor, Claude, or Gemini, allowing developers to ask questions about the Gemini API with these examples as context.\n\n## Contributing\n\nWe welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for detailed instructions on how to:\n\n- Add new examples\n- Create example categories\n- Include images\n- Format your code and comments\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrickvl%2Fgeminibyexample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstrickvl%2Fgeminibyexample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrickvl%2Fgeminibyexample/lists"}