Skip to main content

py-cron-org

A simple sdk for cron-job.org

Installation

pip3 install pycronorg

Usage

>>> import os
>>> from dotenv import load_dotenv
>>> from pycronorg.sync import JobsApi
>>> 
>>>  
>>> assert load_dotenv()  
>>> token = os.environ['CRON_ORG_TOKEN']
>>> api = JobsApi(token)

#-------------------------------------create-------------------------------------
>>> job = api.create(
...      api.Schema(
...         title='hi, cron-job.org',
...         url='http://example.com',
...         scheldule=api.SchelduleSchema(
...             hours=[12],
...             minutes=[0],
...         ),
...     )
... )

#------------------------------------get-job-------------------------------------
>>> assert api.get(job.jobId)

#-------------------------------------update-------------------------------------
>>> api.update(
...     api.SchemaUpdate(
...         jobId=job.jobId,
...         scheldule=api.SchelduleSchema(
...             hours=[13],
...             minutes=[0],
...         )
...     )
... )

#--------------------------------retrieve-history--------------------------------
>>> history = api.retrive_history(job.jobId)

#------------------------------------get-all-------------------------------------
>>> jobs = api.all()

#-------------------------------------delete-------------------------------------
>>> api.delete(job.jobId)
>>> 
>>> 

Contributing

We welcome contributions from the developer community to improve the pycronorg. If you are interested in contributing to the pycronorg, please follow the steps below:

  1. Fork the repository on GitHub.
  2. Create a new branch for your feature or bug fix.
  3. Make the necessary changes in your branch.
  4. Write tests to ensure the changes are working as expected.
  5. Submit a pull request with your changes.

License

The pycronorg is licensed under the MIT License.

Metadata

Release files for pycronorg 0.0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycronorg 0.0.10
File Size Uploaded Provenance Actions
pycronorg-0.0.10.tar.gz 10.5 kB Without provenance Details for pycronorg-0.0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pycronorg 0.0.10
File Interpreter ABI Platform Actions
pycronorg-0.0.10-py3-none-any.whl Python 3 none any Details for pycronorg-0.0.10-py3-none-any.whl

Total release size: 18.5 kB

Release files / pycronorg-0.0.10.tar.gz

Download URL pycronorg-0.0.10.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
780661ae6bcd59677e6f0a6a481e37c275c0d5124f8728c4dca501431b3f0e14
BLAKE2b-256 checksum
How to use checksums
d69974c38a2e9cc1e3afa05927f1479beb2e3828fff8ffa650d0c9bdba02e4c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / pycronorg-0.0.10-py3-none-any.whl

Download URL pycronorg-0.0.10-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b6112477bb814bbf8e8972e1ecd358917244ce068689c9734b0f5895dbbff66
BLAKE2b-256 checksum
How to use checksums
df5d5a6f4072918fe70149af2be90c9ac7378ab0d9a3128bd19ea8073ffe5f37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Security for pycronorg 0.0.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page