Metadata-Version: 2.4
Name: pagerless
Version: 0.1.0
Summary: Pagerless: wake the right person when your app breaks. Groups, scrubs and sends errors, request health, heartbeats and check-ins.
Project-URL: Homepage, https://pagerless.dev
License-Expression: MIT
License-File: LICENSE
Keywords: alerting,celery,django,error-tracking,fastapi,flask,incident,monitoring,on-call
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: System :: Monitoring
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# pagerless

Wake the right person when your Python app breaks. Pagerless groups repeats, scrubs secrets and
personal data before anything leaves your process, and sends errors, request health, heartbeats,
deploys and scheduled-job check-ins to [Pagerless](https://pagerless.dev).

Standard library only. Python 3.9+. Never blocks your code and never raises into it.

```sh
pip install pagerless
export PAGERLESS_KEY=pl_live_...
```

## Start

```python
import pagerless.auto   # reads PAGERLESS_KEY, reports uncaught exceptions (main thread and threads)
```

Or by hand:

```python
import pagerless

pagerless.init()                          # or pagerless.init("pl_live_...", service="shop")

try:
    charge(order)
except Exception:
    pagerless.capture(route="POST /checkout")   # the exception being handled
    raise

pagerless.event("Refunds paused", "tell")       # "wake", "tell" or "log"
pagerless.deploy("2026.10.22-2")                # also sent at start when a release is known
```

Settings: `PAGERLESS_KEY`, `PAGERLESS_ENDPOINT`, `PAGERLESS_SERVICE`, `PAGERLESS_ENV`,
`PAGERLESS_RELEASE`, `PAGERLESS_DISABLED=1`, `PAGERLESS_DEBUG=1`.

## Web frameworks

```python
# FastAPI / Starlette / any ASGI app
from pagerless.asgi import PagerlessMiddleware
app.add_middleware(PagerlessMiddleware)

# Flask
import pagerless.flask
pagerless.flask.init_app(app)

# Django: settings.py
INSTALLED_APPS = [..., "pagerless.django"]
MIDDLEWARE = ["pagerless.django.PagerlessMiddleware", ...]

# Any WSGI app
from pagerless.wsgi import PagerlessMiddleware
application = PagerlessMiddleware(application)
```

## Scheduled jobs

```python
@pagerless.monitor("nightly-backup", pagerless.Schedule(cron="30 3 * * *"))
def backup(): ...

with pagerless.monitor("sync-prices", 3600):   # every hour
    sync()
```

A missed or failed run tells you once. Celery: `pagerless.celery.install(app)` reports task
failures and adds a check-in for every `beat_schedule` entry.

## More

```python
import pagerless.aws_lambda, pagerless.logging

# AWS Lambda: report and send before the invocation returns
@pagerless.aws_lambda.handler
def handle(event, context): ...

# logging: ERROR and above
logging.getLogger().addHandler(pagerless.logging.PagerlessHandler())
```

MIT licensed.
