V1 API client library
In V0 we only had a custom library for accessing archives. For all other parts of the API, you would have to use bravado or requests.
In V0 to get a single or multiple EntryArchive
, you would do:
nomad.client.ArchiveQuery(query=dict(entry_id='7QI6WJP3TNtY-AOqbrB5x13qdG9k'), required={...})[0]
nomad.client.ArchiveQuery(query={...}, required={...})
In V1 we should at least cover more of the entries
endpoint and provide a more involved library. The same examples could look like this:
nomad.api.entry('7QI6WJP3TNtY-AOqbrB5x13qdG9k').get_archive(required={...})
nomad.api.entries({...}).get_archive({...})
This would be more general and also allow:
nomad.api.entries({...}).get_metadata()
nomad.api.entry('7QI6WJP3TNtY-AOqbrB5x13qdG9k').save_raw_file('INCAR', out='/home/my/nomad/INCAR')
Of course this could be naturally extended to other parts of the API.
Since this is supposed to be for endusers design, documentation, and tutorials are crucial. There should be group discussions in early stages of implementing this.