Skip to content

Repository files navigation

fluffer

PyPI Python Versions CI License: MIT

Pre-warming helper for application startup. Run a set of preload callables (optionally in parallel) and get a readiness report covering successes and failures.

Install

pip install fluffer

Quickstart

from fluffer import warm

def load_config():
    return {"env": "dev"}

def connect_cache():
    return True

report = warm([load_config, connect_cache], parallel=True)
assert report.ready is True
assert len(report.tasks) == 2

Why this exists

  • Warm caches, configs, and connections before serving traffic
  • Parallel by default; sequential when you need order
  • Failures are reported, not swallowed — check report.ready

API

Symbol Description
warm(callables, parallel=True) Run preload tasks; return report
WarmResult Aggregate report; .ready, .failures, .tasks
WarmTaskResult Per-task name / ok / result / error

Related packages

Part of the coldbricks micro-library suite (small, typed, zero-dependency helpers):

Package Role
buzzkill Guaranteed shutdown callbacks
aftercare Reverse-order teardown
fluffer Startup pre-warm
edging Token-bucket rate limit
readback Echo-confirmation validation
hearback Output re-validation decorator
agecheck Timezone-correct age thresholds
transponder State broadcast on change

Development

pip install -e ".[dev]"
pytest -q
ruff check .
mypy src

Roadmap

This is an early 0.1.0 release (Alpha) with active development planned:

  • Async/await warm paths
  • Timeout and cancellation per task
  • Integration hooks for health endpoints

License

MIT © Coldbricks — coldbricks@gmail.com

About

Pre-warming helper: run preload tasks and report readiness.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages