Repository navigation
v0.0.1 - Initial Production-Ready Release
π First Release: Production-Ready Gemini SRE Client
This is the initial production-ready release of , an enterprise-grade wrapper for Google's Gemini API with comprehensive SRE features.
β¨ Core Features
π Production SRE Features
- β‘ Automatic retry with exponential backoff and jitter
- π Multi-region failover support (us-central1, europe-west1, europe-west3)
- π Circuit breaker pattern for intelligent region health tracking
- π Cloud Monitoring integration with custom metrics
- π Structured logging with Google Cloud Logging
π§ API Features
- βοΈ Async support with
AsyncGeminiSREClient - β Type-safe structured output with Pydantic schema validation
- π File operations with automatic deduplication
- π¬ Chat operations with context preservation
- π Streaming responses with real-time output
π Observability
- Request latency metrics (p50, p95, p99)
- Success/failure counters
- Retry count tracking
- Circuit breaker state monitoring
- Structured logs with request correlation
π¦ Installation
pip install gemini-sreπ Quick Start
from gemini_sre import GeminiSREClient
# Initialize with SRE features
client = GeminiSREClient(
project_id="your-project-id",
locations=["us-central1", "europe-west1"],
enable_region_failover=True,
enable_circuit_breaker=True,
)
# Generate content
response = client.models.generate_content(
model="gemini-2.5-flash",
contents="Hello, Gemini!",
)
print(response.text)π Examples
This release includes 16 comprehensive examples:
- 4 basic examples (generation, streaming, chat, structured output)
- 5 advanced examples (multi-region, circuit breaker, retry, monitoring, files)
- 4 async examples (basic, streaming, concurrent requests, chat)
- 3 production examples (error handling, logging, best practices)
π§ͺ Testing & Quality
- 62 unit tests with 69% coverage
- Pre-commit hooks (black, isort, ruff, bandit, pytest)
- CI/CD pipeline with GitHub Actions
- Tested on Python 3.9, 3.10, 3.11, 3.12
π Documentation
- README.md - Getting started guide
- SETUP.md - Installation and configuration
- CONTRIBUTING.md - Contribution guidelines
- Examples directory - Working code examples
π Links
- PyPI: https://pypi.org/project/gemini-sre/
- Repository: https://github.com/miticojo/gemini-sre-client
- Issues: https://github.com/miticojo/gemini-sre-client/issues
π License
MIT License - see LICENSE file for details.
Full Changelog: https://github.com/miticojo/gemini-sre-client/blob/main/CHANGELOG.md