Pytask IO
Asynchronous Tasks Library using asyncio
An Asyncio based task queue that is designed to be super easy the use!
Read the docs: Documentation
Install
pip install pytask-io
docker run redis # Rabbit MQ coming soon...
Usage
from pytask_io import PyTaskIO
# Starts the task runner
pytask = PytaskIO(
store_port=6379,
store_host="localhost",
db=0,
workers=1,
)
# Start the PytaskIO task queue on a separate thread.
pytask.run()
# Handle a long running process, in this case a send email function
metadata = pytask.add_task(send_email, title, body)
# Try once to get the results of your email sometime in the future
result = pytask.get_task(metadata)
# Later we can use the `metadata` result to pass to `add_task`
result = pytask.poll_for_task(metadata, tries=100, interval=60)
# Stop PytaskIO completely (This will not affect any units of work that haven't yet executed)
pytask.stop()
Compatible task types
PyTaskIO will always return back the task meta data. Do not embed Python objects of type frame, generator, traceback & context objects. In this case you will get back the exception thrown when PyTaskIO attempts to execute the serialization.
Authors
- joegasewicz - Initial work - @joegasewicz
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Metadata
Release files for pytask-io 0.0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytask-io-0.0.11.tar.gz | 9.4 kB | Without provenance | Details for pytask-io-0.0.11.tar.gz |
Release files / pytask-io-0.0.11.tar.gz
| Download URL | pytask-io-0.0.11.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b96d84cd3bed9b043a361c264dfb9d6564dfb8dc4a938d50bd6b42df23bb032c
|
|
BLAKE2b-256 checksum How to use checksums |
f80b75e258ebbf71625291cd1a19ea5dc91e767501e1dc704331e13076324f0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.0
|
Security for pytask-io 0.0.11
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.