Skip to content

v0.0.1 - Initial Production-Ready Release

Choose a tag to compare

@miticojo miticojo released this 12 Oct 13:13
· 9 commits to main since this 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

πŸ”— Links

πŸ“„ License

MIT License - see LICENSE file for details.


Full Changelog: https://github.com/miticojo/gemini-sre-client/blob/main/CHANGELOG.md