{"id":44505876,"url":"https://github.com/fastuator/fastuator","last_synced_at":"2026-02-18T15:00:37.900Z","repository":{"id":338011417,"uuid":"1155952197","full_name":"fastuator/fastuator","owner":"fastuator","description":"FastAPI production monitoring: /health, /metrics, K8s probes","archived":false,"fork":false,"pushed_at":"2026-02-13T07:02:51.000Z","size":51,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-13T15:32:19.323Z","etag":null,"topics":["actuator","devops","fastapi","health-check","k8s","k8s-probes","metrics","microservices","monitoring","observability","prometheus","python"],"latest_commit_sha":null,"homepage":"","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/fastuator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-12T04:55:27.000Z","updated_at":"2026-02-13T07:02:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fastuator/fastuator","commit_stats":null,"previous_names":["fastuator/fastuator"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/fastuator/fastuator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastuator%2Ffastuator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastuator%2Ffastuator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastuator%2Ffastuator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastuator%2Ffastuator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fastuator","download_url":"https://codeload.github.com/fastuator/fastuator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastuator%2Ffastuator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29443443,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T10:51:12.367Z","status":"ssl_error","status_checked_at":"2026-02-14T10:50:52.088Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["actuator","devops","fastapi","health-check","k8s","k8s-probes","metrics","microservices","monitoring","observability","prometheus","python"],"created_at":"2026-02-13T10:02:12.030Z","updated_at":"2026-02-14T11:01:17.951Z","avatar_url":"https://github.com/fastuator.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg width=\"1600\" height=\"896\" alt=\"fastuator\" src=\"https://github.com/user-attachments/assets/4ef8e865-b49e-479e-ab09-78f14c6cdddc\" /\u003e\n\n#\n\n[![CI](https://github.com/fastuator/fastuator/actions/workflows/test.yml/badge.svg)](https://github.com/fastuator/fastuator/actions/workflows/ci.yml)\n[![Python](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\n\n[![Fastuator](https://img.shields.io/pypi/v/fastuator?style=for-the-badge\u0026logo=python\u0026logoColor=white)](https://pypi.org/project/fastuator/)\n[![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen?style=for-the-badge)](https://github.com/fastuator/fastuator)\n\u003c!--[![Downloads](https://img.shields.io/pypi/dm/fastuator?style=for-the-badge)](https://pypistats.org/packages/fastuator)--\u003e\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/stars/fastuator/fastuator?style=social\" alt=\"GitHub stars\"\u003e\n  \u003cbr\u003e\u003cbr\u003e\n  \n  **Production-ready monitoring toolkit for FastAPI applications.**  \n  Kubernetes probes, Prometheus metrics, and health checks in **one line**.\n  \n\u003c/div\u003e\n\n## ✨ Features\n\n- 🏥 **Health Checks**: Aggregated health status with customizable checks\n- 🔍 **K8s Probes**: Built-in liveness and readiness endpoints\n- 📊 **Prometheus Metrics**: Auto-instrumented HTTP metrics\n- ℹ️ **System Info**: Build version and platform details\n- 🎯 **Zero Config**: Works out of the box with sensible defaults\n- ⚡ **100% Test Coverage**: Battle-tested and production-ready\n\n## 📦 Installation\n\n```bash\npip install fastuator\n```\n\n## 🚀 Quick Start\n\n```python\nfrom fastapi import FastAPI\nfrom fastuator import Fastuator\n\napp = FastAPI()\nFastuator(app)  # That's it!\n```\n\n**Available Endpoints:**\n\n| Endpoint | Description |\n|----------|-------------|\n| `GET /fastuator/health` | Aggregated health status with optional details |\n| `GET /fastuator/liveness` | Kubernetes liveness probe (critical checks only) |\n| `GET /fastuator/readiness` | Kubernetes readiness probe (all dependencies) |\n| `GET /fastuator/metrics` | Prometheus-compatible metrics |\n| `GET /fastuator/info` | Application and system information |\n\n\n## 📖 Usage\n\n### Basic Setup\n\n```python\nfrom fastapi import FastAPI\nfrom fastuator import Fastuator\n\napp = FastAPI()\n\n# Use default configuration\nFastuator(app)\n\n# Custom prefix\nFastuator(app, prefix=\"/monitoring\")\n```\n\n### Custom Health Checks\n\n```python\nfrom fastuator import Fastuator\n\napp = FastAPI()\n\n# Define custom health checks\nasync def database_health():\n    try:\n        # Check database connection\n        await db.execute(\"SELECT 1\")\n        return {\"status\": \"UP\", \"database\": \"connected\"}\n    except Exception as e:\n        return {\"status\": \"DOWN\", \"database\": str(e)}\n\nasync def redis_health():\n    try:\n        await redis.ping()\n        return {\"status\": \"UP\", \"redis\": \"connected\"}\n    except Exception:\n        return {\"status\": \"DOWN\", \"redis\": \"unreachable\"}\n\n# Register custom checks\nFastuator(\n    app,\n    health_checks=[database_health, redis_health],\n    readiness_checks=[database_health, redis_health],\n    liveness_checks=[],  # No external dependencies for liveness\n)\n```\n\n### Health Check Response\n\n**Without details:**\n```bash\ncurl http://localhost:8000/fastuator/health\n```\n```json\n{\"status\": \"UP\"}\n```\n\n**With details:**\n```bash\ncurl http://localhost:8000/fastuator/health?show_details=true\n```\n```json\n{\n  \"status\": \"UP\",\n  \"components\": {\n    \"check_0\": {\n      \"status\": \"UP\",\n      \"cpu_percent\": 45.2\n    },\n    \"check_1\": {\n      \"status\": \"UP\",\n      \"memory_percent\": 62.1,\n      \"memory_available_mb\": 4096\n    }\n  }\n}\n```\n\n## ☸️ Kubernetes Integration\n\n### Deployment Example\n\n```yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: fastapi-app\nspec:\n  template:\n    spec:\n      containers:\n      - name: app\n        image: myapp:latest\n        ports:\n        - containerPort: 8000\n        livenessProbe:\n          httpGet:\n            path: /fastuator/liveness\n            port: 8000\n          initialDelaySeconds: 10\n          periodSeconds: 10\n        readinessProbe:\n          httpGet:\n            path: /fastuator/readiness\n            port: 8000\n          initialDelaySeconds: 5\n          periodSeconds: 5\n```\n\n## 📊 Prometheus Metrics\n\nFastuator automatically collects the following metrics:\n\n- `http_requests_total`: Total HTTP requests (counter)\n- `http_request_duration_seconds`: Request duration histogram\n- `app_health_status`: Health status gauge (1=UP, 0=DOWN)\n\n**Scrape configuration:**\n```yaml\nscrape_configs:\n  - job_name: 'fastapi'\n    static_configs:\n      - targets: ['localhost:8000']\n    metrics_path: '/fastuator/metrics'\n```\n\n## ⚙️ Configuration\n\n```python\nFastuator(\n    app,\n    prefix=\"/fastuator\",              # URL prefix for all endpoints\n    health_checks=[...],               # List of health check functions\n    liveness_checks=[...],             # Checks for liveness probe\n    readiness_checks=[...],            # Checks for readiness probe\n    enable_metrics=True,               # Enable Prometheus metrics\n)\n```\n\n## 🧪 Built-in Health Checks\n\nFastuator includes these health checks by default:\n\n- **CPU Usage**: Reports DOWN if CPU \u003e 90%\n- **Memory Usage**: Reports DOWN if memory \u003e 90%\n- **Disk Usage**: Reports DOWN if disk \u003e 90%\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Run tests (`pytest --cov=fastuator`)\n4. Commit your changes (`git commit -m 'Add amazing feature'`)\n5. Push to the branch (`git push origin feature/amazing-feature`)\n6. Open a Pull Request\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\nInspired by [Spring Boot Actuator](https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html).\n\n## 📚 Related Projects\n\n- [FastAPI](https://fastapi.tiangolo.com/) - Modern web framework for Python\n- [Prometheus](https://prometheus.io/) - Monitoring and alerting toolkit\n- [Kubernetes](https://kubernetes.io/) - Container orchestration platform\n\n\u003cdiv align=\"center\"\u003e\n  \n**⭐ Loved this library? Star us to support!**\n  \n[![Star History Chart](https://api.star-history.com/svg?repos=fastuator/fastuator)](https://star-history.com/#fastuator/fastuator\u0026Date)\n\n\u003c/div\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastuator%2Ffastuator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastuator%2Ffastuator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastuator%2Ffastuator/lists"}