Small tools for everyday scientific work, by Vincent Foriel.
LRFutils.archive: one dated directory per run, named after its parameters, with ametadata.ymlmanifest (date, Python version, Git commit and branch, parameters).LRFutils.pltedit: matplotlib figures saved as editable.pltfiles, reopened in Python or in theplteditdesktop editor.LRFutils.progress,logs,color,term: progress bars, logs and coloured text for scripts.
pip install LRFutilsfrom LRFutils import archive, pltedit
run = archive.new("scan", wavelength_nm=1550) # archives/2026-10-28_1a2b3c4/0001-scan-wavelength_nm=1550/
pltedit.save(fig, run.path / "spectrum.plt")Documentation: https://lrfutils.readthedocs.io
LRFutils 0.2 replaces VFSciTools: vfscitools.archive and pltedit are now
LRFutils.archive and LRFutils.pltedit, with the same behaviour and file formats.
python -m venv .venv
.venv/Scripts/python -m pip install -e ".[dev,docs]" # .venv/bin/python on Linux and macOS
.venv/Scripts/python -m pytest
.venv/Scripts/python -m sphinx -W -b html docs docs/_build/htmlA GitHub release publishes the package on PyPI (.github/workflows/publish.yml); Read the Docs builds the documentation
of every push to main.
MIT license.
If LRFutils helps your work, you can sponsor its development ❤️