Skip to main content

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)
POST /actuator/refresh Re-reads config sources, publishes ConfigChanged (Spring Cloud style)

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

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.2.0.tar.gz (40.5 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.2.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pico_actuator-0.2.0.tar.gz
  • Upload date:
  • Size: 40.5 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.2.0.tar.gz
Algorithm Hash digest
SHA256 3eaab689fc8a684abfdc11c6b44032aadd39c728a132fb32a1d86bb22f9bbbcd
MD5 f8e3cd5b0aa50e5c4f337c47e64acdd1
BLAKE2b-256 c644093a83eacb9ac7c04c104215c291408568d439309a28400472f3294c396a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pico_actuator-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: pico_actuator-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c25742204818317d018d053e6f492d6287a2b55c44897fb7c8f6597e19cda7a3
MD5 33c30b9cbc579e4433121a02ec9ff13f
BLAKE2b-256 253a474617e042716743c07f979952c7ca5eca52832651ce9416bd61944386d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pico_actuator-0.2.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.

Release history Release notifications | RSS feed

0.2.1

2 files

This release

0.2.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page