Celery API discovery module
Given the celery instance, it inspects all available celery workers to get the information about the queues they serve and tasks they know about.
Then it creates a chain of attributes allowing to execute any task as queue_name.full_task_name.delay.
With help of this class you can turn your Celery installation to a set of independent modules, each of which “exposes” its own “Celery API”.
To make it more clear, the analogy with a random HTTP-based API available at http://example.com/users/get?email=john@example.com can be like:
Celery object (including broker URL, result backend settings, etc) is the analogue of the protocol (http://)
Queue name is the analogue of the hostname (example.com)
Task name is the analogue of the URL path (/users/get)
Task parameters the the analogue the querystring (?email=john@example.com)
Usage example.
If we have a Celery installation with two queues: “download” (knows how to execute “downloader.download_url” task) and “parse” (knows how to execute “parser.parse_html”), we can instantiate API and work with it the following way:
>>> api = celery_api.CeleryApi(celery)
>>> html_page = api.download.downloader.download_html.delay('http://example.com').get()
>>> html_tree = api.parse.parser.parse_html.delay(html_page).get()
Metadata
Release files for celery-api 0.1
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 |
|---|---|---|---|---|
| celery-api-0.1.tar.gz | 2.6 kB | Without provenance | Details for celery-api-0.1.tar.gz |
Release files / celery-api-0.1.tar.gz
| Download URL | celery-api-0.1.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7a1a43d54e0f4c2dce751e00fec170bcc66c566ab1455a07b299bc3abccb2b3c
|
|
BLAKE2b-256 checksum How to use checksums |
863eade3fe01e8a752dae0b74f0cbfff075e5c33556f886e53def0b682235c9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for celery-api 0.1
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.