Skip to content

tobi-weber/foliolib

Repository files navigation

FolioLib

PyPI version Supported Python versions Documentation Status

FolioLib is an API-Client for Folio. The API is generated from the RAML and OAS files from the Folio-Modules.

Documentation can be found at https://foliolib.readthedocs.io/.

Python packages can be found at https://pypi.org/project/foliolib/.

Debian packages can be found at https://github.com/tobi-weber/foliolib/releases/latest/.

Features:

  • Python Folio API
  • Commandline interface
  • Install and manage Folio
  • Install and manage Folio on Kubernetes
  • Manage multiple Folio servers

Quickstart

The installation requires python 3.6 or higher.

pip install foliolib

Define a config for your Folio server:

foliolib server create --help
foliolib server create myServer --host okapi.server.url --port 9130 --admin

Make a Folio-API request:

>>> from foliolib import server
>>> from foliolib.folio.usersImpl import UsersImpl
>>> from foliolib.folio.api.inventory import Inventory
>>>
>>> server("myServer")
>>>
>>> UsersImpl("TenantId").login("UserId", "Password")
>>> inventory = Inventory("TenantId")
>>> instances = inventory.get_instances(query="title==*")
>>> print(instances)

Also foliolib provides a command line interface:

foliolib --help