elabftw_ude_cli
elabftw_ude_cli is a Python-based CLI and importable API for interacting with the eLabFTW electronic lab notebook system, tailored for use at the University of Duisburg-Essen.
It provides:
- A command-line interface to create, modify, search, and read experiments.
- A Python API for programmatic integration with pipelines and notebooks.
- Tab-autocomplete support for fast CLI access.
- Optional integration with Python-based workflows like Snakemake.
🛠 Installation
pip install elabftw_ude_cli
🔑 Step 0: Add your API key and base URL
After installation, locate and edit your config.py:
elabftw-cli --config-path
Then open the file and update:
server_name_to_useto clarify which server to use- You can configure multiple servers and teams with different teams and/or test serversfor each server in the servers dictionary give it a name, and define its:
urlpointing to your institution's instanceapi_keywith your generated key (see below)
🎯 How to get your API key:
- Log in to eLabFTW.
- Click your initials in the top-right.
- Go to Settings → API Keys.
- Enter a name, set permission to read/write, and click Generate API Key.
- Copy and store the key safely – it will only be shown once.
⚡ CLI Usage
After installation, use elabftw-cli from the command line.
♻️ Enable tab-completion (Optional; Dose not work for conda based enviroenments)
activate-global-python-argcomplete --user
Or for bash/zsh:
eval "$(register-python-argcomplete elabftw-cli)"
📋 CLI Commands
elabftw-cli create_experiment --name "Exp Title" --body body.md --steps steps.json
elabftw-cli modify_experiment --exp_id 123 --body new_body.md --steps new_steps.json
elabftw-cli search_experiments --name-like "test"
elabftw-cli read_experiment --exp_id 123
📁 File Actions via CLI
elabftw-cli file-actions --name-like "My Experiment" --upload results.csv --replace
elabftw-cli file-actions --name-like "My Experiment" --search
elabftw-cli file-actions --name-like "My Experiment" --delete log.txt error.log
elabftw-cli file-actions --name-like "My Experiment" --download report.txt
File Options
--replace: Replace file if it already exists--delete: Delete files by name match (can be partial)--download: Download files totemp/directory--search: List uploaded files
🧑💻 Python API Usage
import elabftw_ude_cli.api as elf
# Create an experiment
exp_id = elf.create_experiment(
name="My Experiment",
body="<h1>Intro</h1><p>This is HTML</p>",
content_type=2
)
# Modify with body append and steps
elf.modify_experiment(
exp_id=exp_id,
body_append="Done.\nAll checked.",
steps=[{"body": "step_3: summary"}]
)
# Complete a step
elf.complete_step(exp_id, pattern="step_3", change="first", done_by="Alice")
# Search and read
ids, names = elf.search_experiments("test")
data = elf.read_experiment(exp_id=ids[0])
🧬 Snakemake Integration Example
See Snakemake Integration for examples of using this inside workflows.
📋 CLI auto_update and automations:
See Auto Update Guide for scheduling and automation.
📦 License
MIT License. See LICENSE file.
Metadata
Release files for elabftw-ude-cli 0.1.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| elabftw_ude_cli-0.1.16.tar.gz | 16.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| elabftw_ude_cli-0.1.16-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.9 kB
Release files / elabftw_ude_cli-0.1.16.tar.gz
| Download URL | elabftw_ude_cli-0.1.16.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b764bca4d23b5c6d1487d787bfd5cd91c7eabb87320ffcb82d1eb675c06c4c95
|
|
BLAKE2b-256 checksum How to use checksums |
110bf1bfde1bf128799c6525de22dfa0b9c6e0dc0c1af1bae7d59dfb687cc1f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / elabftw_ude_cli-0.1.16-py3-none-any.whl
| Download URL | elabftw_ude_cli-0.1.16-py3-none-any.whl |
|---|---|
| Size | 19.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ec0809ada888530831c1aed2c3a92576b5c54d379625b296f31e364cbf379bb
|
|
BLAKE2b-256 checksum How to use checksums |
15147d776ec0f27c7e61d12d0af20763416e2ed5a84e92fa85e26f2a8903a594
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Security for elabftw-ude-cli 0.1.16
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.