forked from schreiber-lab/scicat_ingest
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Summary
To avoid putting tokens or credientials in scripts and jupyter notebooks, I usually parse them from a config file. It would be nice to move this code inside pyscicat.
Current behavior
Creating a ScicatClient currently requires either a token or a username/password to be supplied. Providing only the base_url results in an AssertionError.
Proposed behavior
If neither token nor credentials are supplied, read them from the following sources:
$SCICAT_TOKENenvironmental variable$SCICAT_USERand$SCICAT_PASSWORD- The file
$XDG_CONFIG_HOME/scicat/config.ini(path subject to discussion) containing either of the above variables.
For instance, I might set /.config/scicat/config.ini to the following:
SCICAT_USER = ingestor
SCICAT_PASSWORD = myp4ssw0rd
Metadata
Metadata
Assignees
Labels
No labels