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.1.tar.gz (41.9 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.1-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pico_actuator-0.2.1.tar.gz
  • Upload date:
  • Size: 41.9 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.1.tar.gz
Algorithm Hash digest
SHA256 d227810078b981127173badaa626772b2c40411a96e36b773640e84b2a15bcc1
MD5 fe536a56f535b0b655bcbe054cfd66f3
BLAKE2b-256 c2b5111d85edb21612003b96f51003d460d50acdbe1846a3ae4190205011c0af

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pico_actuator-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 11.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 026b181b8d1ef6b5efdd411ada3a2259e33412707eb1836ba933369a69cc7323
MD5 f64198d4d25b37d5e83b59ee76f1134c
BLAKE2b-256 f2780a37227e052c34bfcbc8e9113aba1e9b1e0d4244825e6b3b761b552f8f16

See more details on using hashes here.

Provenance

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

This release

0.2.1 This release

2 files

0.2.0

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