anna client
setup
$ pip install anna-client
usage
initialization
from anna_client.client import Client
client = Client(endpoint='http://localhost:5000/graphql')
get jobs
# get all job ids
jobs = client.get_jobs()
# you can specify a where clause & the fields you wish to receive
jobs = client.get_jobs(where={'id_in', [...]}, fields=('driver','site','status'))
create jobs
# create_jobs takes a list of dicts describing your jobs
jobs = client.create_jobs(data=[{'driver': 'firefox', 'site': 'test'}])
delete jobs
# provide no parameters in order to delete all jobs
client.delete_jobs(where={})
# or delete specific jobs
client.delete_jobs(where={'id_in': my_jobs})
update jobs
# provide no where parameter in order to update all jobs
client.update_jobs(data={'status': 'STOPPED'})
# or update specific jobs
client.delete_jobs(where={'id_in': my_jobs}, data={'status': 'STOPPED'})
reserve jobs
# reserve_jobs takes a worker and a tuple of job ids
client.reserve_jobs(worker='worker', job_ids=my_jobs)
get tasks
# get_tasks takes a namespace & returns a url and a list of tuples containing the task names & definitions
url, tasks = client.get_tasks(namespace='test')
Release files for anna-client 1.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| anna-client-1.1.9.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| anna_client-1.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.1 kB
Release files / anna-client-1.1.9.tar.gz
| Download URL | anna-client-1.1.9.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f0be24fb4e797ce778d573d482c3180cfa03402048099c843b369dbd314f9aea
|
|
BLAKE2b-256 checksum How to use checksums |
1d2bbecb8ca6b3311d8c319ff51be324cbd6bf22f89a787aed5bd0633d0f4f6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.4
|
Release files / anna_client-1.1.9-py3-none-any.whl
| Download URL | anna_client-1.1.9-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b6e349d137ed06e5ad42fb7f506208c67f627e6e578f6c7b83d90cc398363a7b
|
|
BLAKE2b-256 checksum How to use checksums |
9f93b6a4dc4d06fe25cd0af50cad8aa1e689eb91c077e053fd46a0872be8f1d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.4
|