elabapi-python
elabapi-python copied to clipboard
eLabFTW REST API v2 Python library
elabapi-python
Python library for eLabFTW REST API.
Description
This repository allows generating a python library to interact with eLabFTW REST API v2. It uses Swagger Codegen to generate it based on the OpenApi specification of eLabFTW REST API v2.
As such, it doesn't contain the generated code, but only instructions on how to generate it for local development.
Users should install the library with pip, as described below.
Installation
# create a virtual environment
python -m venv elab
# activate it
source elab/bin/activate
# on Windows
# C:\> elab\Scripts\activate.bat
# install the library
pip install elabapi-python
Usage
See the examples folder.
Unofficial documentation
From TU Graz:
- https://alexgu2008.github.io/elabftw_api_support/
Dev
Using the helper script
# generate the library
./helper.sh generate
# generate from local file: openapi.yaml must be in current dir
./helper.sh generate-from-local
# build packages
./helper.sh build
Installing the library for dev
./helper.sh install-dev
Publishing a new version
- Bump version in config.json
- Commit and push
- Tag and push --tags
- Create release on GitHub
License
MIT, see license file.