Created
December 15, 2021 15:21
-
-
Save lgfa29/ca2f9470da20049bfd2f92cce80c43d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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