Extracts metadata from eLabFTW experiments
Project description
mease-elabftw
A Python library for interacting with eLabFTW experiments:
- Create NWB metadata from an eLabFTW experiment
- Upload files (e.g. analysis result from HPC) to an eLabFTW experiment
- List eLabFTW experiments from the command line
Setup
python -m pip install mease-elabftw
To authenticate requests to the eLabFTW server you also need to generate an API key in eLabFTW (User Panel -> API Keys -> GENERATE AN API KEY),
and then set the environment variable ELABFTW_TOKEN to this key, e.g.
export ELABFTW_TOKEN=abc123abc123abc123
Use in Python
Get nwb metadata from an elabftw experiment to use in mease-lab-to-nwb:
>>> import mease_elabftw
>>> mease_elabftw.list_experiments("Liam")
['163: test fake experiment without json metadata (Liam Keegan, 2021-10-07)', '156: test fake experiment with json metadata (Liam Keegan, 2021-10-01)']
>>> metadata = mease_elabftw.get_nwb_metadata(156)
>>> metadata["NWBFile"]["session_description"]
test fake experiment with json metadata
>>> metadata["NWBFile"]["identifier"]
20211001-8b6f100d66f4312d539c52620f79d6a503c1e2d1
Use from terminal
List all experiments on elabftw belonging to user "Liam":
$ elabftw-list Liam
163: test fake experiment without json metadata (Liam Keegan, 2021-10-07)
156: test fake experiment with json metadata (Liam Keegan, 2021-10-01)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mease_elabftw-0.0.7.tar.gz.
File metadata
- Download URL: mease_elabftw-0.0.7.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06eadd27716083e0b8f07ef57730d80ae4065ced8a8aa78430d2e2f56d108cae
|
|
| MD5 |
ac80a136ff0be16dbda20f1ebaf66009
|
|
| BLAKE2b-256 |
1aba4183a307206eae8fc5577ca840f64be2fb10be90b26ccdc4045b3f0a7b69
|
File details
Details for the file mease_elabftw-0.0.7-py3-none-any.whl.
File metadata
- Download URL: mease_elabftw-0.0.7-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1575c1bcbc6e719af265828e95aa2fd73e8c72fd5a49b4653071ce43ef69b2c9
|
|
| MD5 |
9133dd17741406578f8ee8d7f911a701
|
|
| BLAKE2b-256 |
f3b026b1589dfe2068c11fd998e23aaf3c5259fbfacd711396332efd61b4d3de
|