Skip to main content

Spring Boot-style actuator for the Pico ecosystem: /health, /info, /metrics over pico-fastapi.

Project description

📦 pico-actuator

PyPI Ask DeepWiki License: MIT CI (tox matrix) codecov Quality Gate Status Duplicated Lines (%) Maintainability Rating Docs Interactive Lab

Spring Boot-style actuator endpoints for the Pico ecosystem, built on top of pico-fastapi.

Auto-discovered by pico-boot — install it and the endpoints appear:

Endpoint Purpose
GET /actuator/health Overall status + per-component detail (200/503)
GET /actuator/health/live Liveness — process is responding, touches no deps
GET /actuator/health/ready Readiness — aggregate of all health indicators
GET /actuator/info Static config + dynamic contributors
GET /actuator/metrics Prometheus default registry (needs the metrics extra)

Install

pip install pico-actuator
# optional Prometheus /metrics:  pip install pico-actuator[metrics]

Use

Contribute health by implementing HealthIndicator and marking it @component. No registration, no wiring — pico-ioc collects them via List[HealthIndicator]:

from pico_ioc import component
from pico_actuator import HealthIndicator

@component
class DbHealth:  # satisfies HealthIndicator
    name = "db"
    def __init__(self, engine: Engine):
        self.engine = engine
    def check(self):
        self.engine.connect().close()
        return {"status": "UP"}

check() may be sync or async; return a dict ({"status": "UP", ...}) or a truthy value. Indicators run concurrently, each under a configurable timeout (actuator.check_timeout_seconds, default 5s). A raising or hanging indicator is reported DOWN in isolation — it never takes the endpoint down.

Add /info data the same way with InfoContributor, or statically via config:

# application.yaml
actuator:
  enabled: true
  show_components: true
  info:
    app: my-service
    build: "2026.06"

Documentation

Full docs at dperezcabrera.github.io/pico-actuator — getting started, user guide, how-to guides, API reference.

AI Coding Skills

Claude Code and OpenAI Codex skills for AI-assisted development:

curl -sL https://raw.githubusercontent.com/dperezcabrera/pico-skills/main/install.sh | bash -s -- actuator

Why

pico-ioc already exposes @health/@cleanup lifecycle primitives but nothing serves them. This package is the thin layer that turns them into operable HTTP endpoints — the one observability piece you can't improvise in ten lines.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pico_actuator-0.1.0.tar.gz (39.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pico_actuator-0.1.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file pico_actuator-0.1.0.tar.gz.

File metadata

  • Download URL: pico_actuator-0.1.0.tar.gz
  • Upload date:
  • Size: 39.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pico_actuator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 73f7acdc5c90b6506cbbbb1cf686c43f22a0906f57a8af261fb964fc28d09a5e
MD5 42c70049504c6f1db038a1617edd3796
BLAKE2b-256 71b0a33f36ced672c58268569d5751ea5280d0af7dd2a053244312ce5510c0b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pico_actuator-0.1.0.tar.gz:

Publisher: publish-to-pypi.yml on dperezcabrera/pico-actuator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pico_actuator-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pico_actuator-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pico_actuator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f95e5de69ef0dc339b304d596137677156d89b34d9393ccabdd27f04d51980ed
MD5 14aa4c82e4b1c04e415e369b4e2ca49a
BLAKE2b-256 d015994bc8e9906e2b96ac0bea836c7bf60dd59e81a5d067dadaf7e7b8fbcfa0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pico_actuator-0.1.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on dperezcabrera/pico-actuator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page