expired
Tiny utility to check whether a timestamp has expired relative to UTC now.
Install the lupaxa-expired package and import the lupaxa.expired
namespace. Use it from Python or from the expired CLI in shell scripts.
What counts as expired
is_expired(when) compares when to (now - delta):
- With no window,
deltais zero. Any time strictly before UTC now is expired. A time equal to now is not. - Pass
days=3(or other parts) or an explicittimedeltato use a window instead of a hard cutoff at now. - Naive datetimes are treated as UTC.
That is the same rule the CLI uses.
What you get
- A boolean library API (
is_expired) plus helpers to parse timestamps and build windows - Built-in SQL, ISO-8601, and date-only formats;
fmt=for anything else - A small CLI with stdout
expired/not expiredand exit codes for scripts - Python 3.10+, no runtime dependencies
Next steps
- Getting started — install and first checks
- Usage — library options and CLI flags
- Reference — public API and exit codes
- Examples — copy-paste recipes