gduverger / crono-api-client

🔮 Crono (programmatic time-based job scheduler) API Python client

Home Page:https://crono.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crono API Client

Python client for the 🔮 Crono API: https://crono.com/

>>> import crono_api_client as crono
>>> crono.request('POST', https://your.app/').after(hours=42)

How to

Install package:

$ pip install crono_api_client

Configure .env variables:

CRONO_API_URL=… 
CRONO_API_KEY=…

Get all jobs:

>>> job_uuids = crono.jobs()

Get a job:

>>> job_json = crono.job(<string:job_uuid>)

Schedule a job:

>>> job_uuid = crono.<task>(<args>, <kwargs>).<trigger>(<args>, <kwargs>)
>>> # or
>>> job_uuid = crono.<trigger>(<args>, <kwargs>).<task>(<args>, <kwargs>)

Delete a job:

>>> job_uuid = crono.delete(<string:job_uuid>)

Development

Packaging

# Generating distribution archives
$ python setup.py sdist bdist_wheel

# Uploading the distribution archives
$ twine upload --skip-existing dist/*

About

🔮 Crono (programmatic time-based job scheduler) API Python client

https://crono.com/

License:MIT License


Languages

Language:Python 100.0%