NomadApi

class ase2sprkkr.bindings.nomad.nomad_api.NomadApi(nomad_url=None)[source]

Class hierarchy

Inheritance diagram of ase2sprkkr.bindings.nomad.nomad_api.NomadApi


Constructor

__init__(nomad_url=None)[source]
default_api_url = 'https://nomad-lab.eu/prod/v1/api/v1/'
requests = <module 'requests' from '/home/logik/.local/lib/python3.14/site-packages/requests/__init__.py'>
get_authentication_token(username, password, expires=None)[source]

Get the token for accessing your NOMAD unpublished uploads remotely

create_dataset(dataset_name, token=None)[source]

Create a dataset to group a series of NOMAD entries

upload(upload_file, token=None)[source]

Upload a single file for NOMAD upload, e.g., zip format

check_upload_status(upload_id, token=None)[source]

# upload success => returns ‘Process publish_upload completed successfully’ # publish success => ‘Process publish_upload completed successfully’

edit_upload_metadata(upload_id, metadata, token=None)[source]

Edit the metadata of an existing NOMAD upload.

Example payload:

metadata = {
    "metadata": {
        "upload_name": "Test_Upload_Name",
        "references": ["https://doi.org/xx.xxxx/xxxxxx"],
        "datasets": dataset_id,
        "embargo_length": 0,
        "coauthors": ["coauthor@affiliation.de"],
        "comment": "This is a test upload...",
    },
}
publish_upload(upload_id, token=None)[source]

Publish an upload