Skip to content

Instantly share code, notes, and snippets.

@lgfa29
Created December 15, 2021 15:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lgfa29/ca2f9470da20049bfd2f92cce80c43d8 to your computer and use it in GitHub Desktop.
Save lgfa29/ca2f9470da20049bfd2f92cce80c43d8 to your computer and use it in GitHub Desktop.
import nomad_client
from pprint import pprint
from nomad_client.api import allocations_api
configuration = nomad_client.Configuration(
host = "http://127.0.0.1:4646/v1"
)
with nomad_client.ApiClient(configuration) as api_client:
allocs_api = allocations_api.AllocationsApi(api_client)
try:
resp = allocs_api.get_allocations(resources=True, task_states=True)
pprint(resp)
except nomad_client.ApiException as e:
print("Exception when calling AllocationsApi->get_allocations: %s\n" % e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment