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
mease_elabftw-0.0.5.tar.gz
(10.7 kB
view details)
Built Distribution
File details
Details for the file mease_elabftw-0.0.5.tar.gz
.
File metadata
- Download URL: mease_elabftw-0.0.5.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4e17afb0952e14d459acf16a3b7b858e30faa9042f686d3b09a8ac705bb782d |
|
MD5 | 84f2987b8c1a20cbe66488e74e7636ac |
|
BLAKE2b-256 | 9958e932e4f48fbd275cf767a2cea68f9c4762294da5052add60ca9ab4214b4c |
File details
Details for the file mease_elabftw-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: mease_elabftw-0.0.5-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 559ac0c03a6929f629eb79d24861310ee897ee6f653aa1fff25750d9199a6160 |
|
MD5 | e6fc148093d689f37c0bfe7eeebddf0c |
|
BLAKE2b-256 | 67e3550d3cc8924194bd25ba3a0e7b5a586703d818f8d167b52643027305ed49 |