Python library for Ex Libris Primo (OMNIS) API
Project description
omnis-py
Biblioteka Python do obsługi API Ex Libris Primo (sieć OMNIS) oraz narzędzie CLI do zarządzania kontami bibliotecznymi.
Opis (PL)
omnis-py to biblioteka umożliwiająca programistyczny dostęp do kont czytelnika w bibliotekach korzystających z systemu Ex Libris Primo (w Polsce działających głównie w ramach sieci OMNIS).
Główne funkcjonalności
- Autentykacja: Logowanie do systemów bibliotecznych przy użyciu numeru karty i hasła.
- Wypożyczenia: Pobieranie listy aktywnych wypożyczeń wraz ze szczegółami (data zwrotu, autor, tytuł, filia).
- Informacje o użytkowniku: Pobieranie stanu konta, liczby wypożyczeń, rezerwacji oraz naliczonych kar.
- Prolongata: Możliwość przedłużania terminu zwrotu książek.
- Narzędzie CLI: Wygodna aplikacja terminalowa do monitorowania wielu kont na raz.
Obsługiwane biblioteki (znane tenany)
Biblioteka jest uniwersalna i obsługuje m.in.:
- Biblioteka Raczyńskich (Poznań)
- Biblioteka Narodowa (Warszawa)
- Biblioteka UAM (Poznań)
- Dolnośląska Biblioteka Publiczna (Wrocław)
- Uniwersytet Jagielloński (Kraków)
- Uniwersytet Mikołaja Kopernika (Toruń)
- Wojewódzka Biblioteka Publiczna (Kielce)
- Koszalińska Biblioteka Publiczna
- Książnica Zamojska
- ...oraz każdą inną bibliotekę Primo po podaniu jej adresu URL i kodu instytucji.
Instalacja
pip install omnis-py
Dla narzędzia CLI zalecane jest użycie pipx:
pipx install omnis-py
Użycie CLI
Po instalacji dostępne jest polecenie omnis-cli.
Przy pierwszym uruchomieniu program poprowadzi Cię przez kreator dodawania konta. Konfiguracja jest przechowywana w ~/.config/omnis-py/config.yaml.
omnis-cli- wyświetla podsumowanie dla wszystkich kont i listę książek pogrupowaną według filii.omnis-cli --add- dodaje nowe konto do konfiguracji.omnis-cli --renew- próbuje przedłużyć wszystkie wypożyczenia oznaczone jako odnawialne dla skonfigurowanych kont przed pobraniem danych. Używaj ostrożnie; operacja wykona się bez dodatkowego potwierdzenia.
Description (EN)
omnis-py is a Python library providing programmatic access to patron accounts in libraries using the Ex Libris Primo system (widely used in Poland under the OMNIS network).
Key Features
- Authentication: Login using card number and password.
- Loans: Fetch active loans with details (due date, author, title, branch).
- User Info: Get account status, number of loans, requests, and fines.
- Renewal: Support for renewing book loan terms.
- CLI Tool: A convenient terminal application to monitor multiple accounts at once.
Supported Libraries
The library is generic and supports various institutions including:
- Raczyński Library (Poznań)
- National Library of Poland (Warszawa)
- Adam Mickiewicz University Library (Poznań)
- Lower Silesian Public Library (Wrocław)
- Jagiellonian University (Kraków)
- Nicolaus Copernicus University (Toruń)
- ...and any other Primo library by providing its URL and institution code.
Installation
pip install omnis-py
For the CLI tool, using pipx is recommended:
pipx install omnis-py
CLI Usage
Once installed, the omnis-cli command becomes available.
On first run, it will guide you through adding an account. Configuration is stored in ~/.config/omnis-py/config.yaml.
omnis-cli- shows a summary for all accounts and a book list grouped by branch.omnis-cli --add- adds a new account to the configuration.omnis-cli --renew- attempts to renew all loans marked as renewable for configured accounts before fetching data. Use with caution; this action runs without an additional confirmation.
Home Assistant
Istnieje również integracja dla Home Assistant korzystająca z tej biblioteki: omnis-ha.
There is also a Home Assistant integration using this library: omnis-ha.
License
MIT
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file omnis_py-0.2.2.tar.gz.
File metadata
- Download URL: omnis_py-0.2.2.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aea2c21f3ed439c0dd98d5010bdb702916666923657e11e45e766ef337ae9936
|
|
| MD5 |
1615f7e8220d37f3ec568b4a1b507b23
|
|
| BLAKE2b-256 |
ff6b76e20bf01bca2048d20a141ccbef3b6daba190ccd4e0fc780f64d61562ac
|
Provenance
The following attestation bundles were made for omnis_py-0.2.2.tar.gz:
Publisher:
ci.yml on theundefined/omnis-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omnis_py-0.2.2.tar.gz -
Subject digest:
aea2c21f3ed439c0dd98d5010bdb702916666923657e11e45e766ef337ae9936 - Sigstore transparency entry: 854620912
- Sigstore integration time:
-
Permalink:
theundefined/omnis-py@ee166b79e4c00d8c9b5a5dc160642bd596c6ad22 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/theundefined
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@ee166b79e4c00d8c9b5a5dc160642bd596c6ad22 -
Trigger Event:
push
-
Statement type:
File details
Details for the file omnis_py-0.2.2-py3-none-any.whl.
File metadata
- Download URL: omnis_py-0.2.2-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac1a671cef2b72d5df0dcefb21cf0a877eac62db9710ac8e0b8997f7c3c481c0
|
|
| MD5 |
260e022cb3e57da70c584db1e285f393
|
|
| BLAKE2b-256 |
c4db89d08c505032d22ef89e5fc05c0db28b865498974b480133811ef7276ccc
|
Provenance
The following attestation bundles were made for omnis_py-0.2.2-py3-none-any.whl:
Publisher:
ci.yml on theundefined/omnis-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omnis_py-0.2.2-py3-none-any.whl -
Subject digest:
ac1a671cef2b72d5df0dcefb21cf0a877eac62db9710ac8e0b8997f7c3c481c0 - Sigstore transparency entry: 854620937
- Sigstore integration time:
-
Permalink:
theundefined/omnis-py@ee166b79e4c00d8c9b5a5dc160642bd596c6ad22 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/theundefined
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@ee166b79e4c00d8c9b5a5dc160642bd596c6ad22 -
Trigger Event:
push
-
Statement type: