Guides
Practical guides for common eventkit workflows and patterns.
Available Guides
Setup & Configuration
- Local Development - Set up your development environment with emulators
- GCS + BigQuery Setup - Production storage configuration (coming soon)
- Queue Modes - AsyncQueue vs PubSubQueue (coming soon)
Storage
- Custom Storage - Implement your own EventStore backend (coming soon)
Deployment
- Cloud Run Deployment - Deploy to Google Cloud Run (coming soon)
- GKE Deployment - Kubernetes deployment patterns (coming soon)
Quick References
Environment Variables
# Storage
export EVENTKIT_EVENT_STORE="gcs" # gcs | firestore
export GCP_PROJECT_ID="my-project"
export GCP_GCS_BUCKET="my-events"
export GCP_BIGQUERY_DATASET="events"
# Queue
export EVENTKIT_QUEUE_MODE="async" # async | pubsub
export EVENTKIT_ASYNC_WORKERS="4"
# Ring Buffer (Durability)
export EVENTKIT_RING_BUFFER_DB_PATH="./eventkit_ring_buffer.db"Common Commands
# Development
docker compose up -d # Start emulators
uv run uvicorn eventkit.api.app:app --reload
# Testing
pytest # All tests
pytest tests/unit/ # Unit tests only
pytest --cov=src/eventkit # With coverage
# Code quality
mypy src/eventkit # Type check
ruff check src/ # Lint
ruff format src/ # FormatAPI Endpoints
# Health checks
curl http://localhost:8000/health # Liveness
curl http://localhost:8000/ready # Readiness
# Collection endpoints
POST /collect/{stream} # Flexible ingestion
POST /v1/identify # Segment-compatible
POST /v1/track
POST /v1/pageCommon Patterns
Custom Validation Rules
from eventkit.adapters.validators import Validator
class CustomValidator(Validator):
def validate(self, payload: dict) -> tuple[bool, str | None]:
# Your validation logic
if "required_field" not in payload:
return False, "Missing required_field"
return True, None
# Use in pipeline
from eventkit.adapters.validators import ValidationPipeline
pipeline = ValidationPipeline([CustomValidator(), ...])Dual-Path Architecture
Process the same events through multiple coordinators for different use cases:
# Path 1: Real-time processing (<1s latency)
realtime_coordinator = EventSubscriptionCoordinator(
subscription="events-realtime",
handler=process_immediately
)
# Path 2: Batched archival (5-10 min latency)
archive_coordinator = EventSubscriptionCoordinator(
subscription="events-archive",
handler=event_loader.add
)
manager = EventCoordinatorManager([
realtime_coordinator,
archive_coordinator
])
await manager.start_all()Next Steps
- Local Development - Start developing locally
- API Reference - Explore the full API
- Contributing - Contribute to eventkit
Last updated on