Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

anna-client

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anna-client

anna API client

  • 1.1.9
  • PyPI
  • Socket score

Maintainers
1

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')

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc