A FastAPI application that polls Mixpanel API and GitHub API to display ZenML metrics on LaMetric devices.
- Install dependencies:
pip install -r requirements.txt
- Configure environment variables:
cp .env.example .env
# Edit .env with your Mixpanel service account credentials
- Run locally:
python main.py
- Initialize fly app:
fly launch
- Set environment variables:
fly secrets set MIXPANEL_PROJECT_ID=your_project_id
fly secrets set MIXPANEL_SERVICE_ACCOUNT_USERNAME=your_service_account_username
fly secrets set MIXPANEL_SERVICE_ACCOUNT_SECRET=your_service_account_secret
fly secrets set GITHUB_TOKEN=your_github_token # Optional - for higher rate limits
- Deploy:
fly deploy
Configure your LaMetric device to poll the /metrics
endpoint:
- URL:
https://your-app.fly.dev/metrics
- Poll interval: 30 seconds (or as desired)
GET /
: Health checkGET /metrics
: LaMetric-formatted metrics endpoint