get_nomad_oasis_access_token

Command-line usage

usage: cell get_nomad_oasis_access_token [-h]
                                         [-u https://nomad-lab.eu/prod/v1/staging/api/v1/]
                                         [-e None] [-n None] [-p None]
                                         [-o None]

options:
  -h, --help            show this help message and exit
  -u, --base-url https://nomad-lab.eu/prod/v1/staging/api/v1/
                        Base URL of the NOMAD / NOMAD OASIS API.
  -e, --path-to-dotenv None
                        Path to .env file containing OASIS_USER_NAME and
                        OASIS_PASSWORD.
  -n, --username None   Username for the NOMAD / NOMAD OASIS account.
  -p, --userpassword None
                        Password for the NOMAD / NOMAD OASIS account (if not
                        prompted).
  -o, --output-file None
                        Optional file path to save the access token.

Arguments and behavior

clusterx.cli.get_nomad_oasis_access_token.get_nomad_oasis_access_token(base_url='https://nomad-lab.eu/prod/v1/staging/api/v1/', path_to_dotenv=None, username=None, userpassword=None, output_file=None)

Obtain an access token for NOMAD or NOMAD OASIS.

If credentials are not provided via arguments or a .env file, you will be prompted interactively and securely for your username and password.

Parameters:
base_urlstr, optional

Base URL of the NOMAD / NOMAD OASIS API. Default is "https://nomad-lab.eu/prod/v1/staging/api/v1/".

path_to_dotenvstr, optional

Path to .env file containing OASIS_USER_NAME and OASIS_PASSWORD.

usernamestr, optional

Username for the NOMAD / NOMAD OASIS account.

userpasswordstr, optional

Password for the NOMAD / NOMAD OASIS account (if not prompted).

output_filestr, optional

Optional file path to save the access token.

Examples

Prompt for username and password interactively:

$ cell get_nomad_oasis_access_token -u https://sol-oasis.physik.hu-berlin.de/nomad-oasis/api/v1/

Prompt and save token directly to a file:

$ cell get_nomad_oasis_access_token \
    -u https://sol-oasis.physik.hu-berlin.de/nomad-oasis/api/v1/ \
    -o nomad_token.txt