samco-job-lifecycle
A small, dependency-free Python library for tracking the state of a job. It validates transitions, records UTC timestamps, and keeps an in-memory event history. It does not run jobs or store them in a database.
Install
pip install samco-job-lifecycle
Example
from samco_job_lifecycle import Job, JobStatus
job = Job("report-42")
job.start()
job.succeed()
assert job.status is JobStatus.SUCCEEDED
assert job.is_terminal
print(job.events)
Valid paths are pending -> running -> succeeded|failed|cancelled and pending -> cancelled. Terminal jobs cannot transition again. Invalid changes raise InvalidTransition.
Requires Python 3.9 or newer.
Metadata
Release files for samco-job-lifecycle 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| samco_job_lifecycle-0.1.0.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| samco_job_lifecycle-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.8 kB
Release files / samco_job_lifecycle-0.1.0.tar.gz
| Download URL | samco_job_lifecycle-0.1.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49fd5174314cf3e3dd1994176a6c0db6f1200767d943d33a4bfd1da4459b5f47
|
|
BLAKE2b-256 checksum How to use checksums |
b63a599526f8b7ee71d42bf0116e81cc2c855728c53d6169406bf1423e3ddb77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.10
|
Release files / samco_job_lifecycle-0.1.0-py3-none-any.whl
| Download URL | samco_job_lifecycle-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e99b95d14958fe1174be765f676008f49e9a0a39395b2a66564ed67de5d96f44
|
|
BLAKE2b-256 checksum How to use checksums |
30838cf5475fcca139572ff4c7bf9655f84b7ecb1d62c7517054d826f62b0cdd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.10
|