Skip to main content

almapipy: Python Wrapper for Alma API

almapipy is python requests wrapper for easily accessing the Ex Libris Alma API. It is designed to be lightweight, and imposes a structure that mimics the Alma API architecture.

Installation

pip install almapipy

Progress and Roadmap

Get functionality has been developed around all the Alma APIs (listed below). Post, Put and Delete functions will be gradually added in future releases.

API Get Post Put Delete
bibs X
analytics X NA NA NA
acquisitions X
configuration X
courses X
resource sharing partners X
task-lists X
users X
electronic X

Use

Import

# Import and call primary Client class
from almapipy import AlmaCnxn
alma = AlmaCnxn('your_api_key', data_format='json')

Access Bibliographic Data

Alma provides a set of Web services for handling bibliographic records related information, enabling you to quickly and easily manipulate bibliographic records related details. These Web services can be used by external systems to retrieve or update bibliographic records related data.

# Use Alma mms_id for retrieving bib records
harry_potter = "9980963346303126"
bib_record = alma.bibs.catalog.get(harry_potter)

# get holding items for a bib record
holdings = alma.bibs.catalog.get_holdings(harry_potter)

# get loans by title
loans = alma.bibs.loans.get_by_title(harry_potter)
# or by a specific holding item
loans = alma.bibs.loans.get_by_item(harry_potter, holding_id, item_id)

# get requests or availability of bib
alma.bibs.requests.get_by_title(harry_potter)
alma.bibs.requests.get_by_item(harry_potter, holding_id, item_id)
alma.bibs.requests.get_availability(harry_potter, period=20)

# get digital representations
alma.bibs.representations.get(harry_potter)

# get linked data
alma.bibs.linked_data.get(harry_potter)

Access Reports

The Analytics API returns an Alma report.

# Find the system path to the report if don't know path
alma.analytics.paths.get('/shared')

# retrieve the report as an XML ET element (native response)
report = alma.analytics.reports.get('path_to_report')

# or convert the xml to json after API call
report = alma.analytics.reports.get('path_to_report', return_json = True)

Access Courses

Alma provides a set of Web services for handling courses and reading lists related information, enabling you to quickly and easily manipulate their details. These Web services can be used by external systems such as Courses Management Systems to retrieve or update courses and reading lists related data.

# Get a complete list of courses. Makes multiple calls if necessary.
course_list = alma.courses.get(all_records = True)

# or filter on search parameters
econ_courses = alma.courses.get(query = {'code': 'ECN'})

# get reading lists for a course
course_id = econ_courses['course'][0]['id']
reading_lists = alma.courses.reading_lists.get(course_id)

# get more detailed information about a specific reading list
reading_list_id = reading_lists['reading_list'][0]['id']
alma.courses.reading_lists(course_id, reading_list_id, view = 'full')

# get citations for a reading list
alma.courses.citations(course_id, reading_list_id)

Access Users

Alma provides a set of Web services for handling user information, enabling you to quickly and easily manipulate user details. These Web services can be used by external systems—such as student information systems (SIS)—to retrieve or update user data.

# Get a list of users or filter on search parameters
users = alma.users.get(query = {'first_name': 'Sterling', 'last_name': 'Archer'})

# get more information on that user
user_id = users['user'][0]['primary_id']
alma.users.get(user_id)

# get all loans or requests for a user. Makes multiple calls if necessary.
loans = alma.user.loans.get(user_id, all_records = True)
requests = alma.user.requests.get(user_id, all_records = True)

# get deposits or fees for a user
deposits = alma.users.deposits.get(user_id)
fees = alma.users.fees.get(user_id)

Access Acquisitions

Alma provides a set of Web services for handling acquisitions information, enabling you to quickly and easily manipulate acquisitions details. These Web services can be used by external systems - such as subscription agent systems - to retrieve or update acquisitions data.

# get all funds
alma.acq.funds.get(all_records=True)

# get po_lines by search
amazon_lines = alma.acq.po_lines.get(query={'vendor_account': 'AMAZON'})
single_line_id = amazon_lines['po_line'][0]['number']
# or by a specific line number
alma.acq.po_lines.get(single_line_id)

# search for a vendor
alma.acq.vendors.get(status='active', query={'name':'AMAZON'})
# or get a specific vendor
alma.acq.vendors.get('AMAZON.COM')

# get invoices or polines for a specific vendor
alma.acq.vendors.get_invoices('AMAZON.COM')
alma.acq.vendors.get_po_lines('AMAZON.COM')

# or get specific invoices
alma.acq.invoices.get('invoice_id')

# get all licenses
alma.acq.licenses.get(all_records=True)

Access Configuration Settings

Alma provides a set of Web services for handling Configuration related information, enabling you to quickly and easily receive configuration details. These Web services can be used by external systems in order to get list of possible data.

# Get libraries, locations, departments, and hours
libraries = alma.conf.units.get_libaries()
library_id = libraries['library'][0]['code']
locations = alma.conf.units.get_locations(library_id)
hours = alma.conf.general.get_hours(library_id)
departments = alma.conf.units.get_departments()

# Get system code tables
table = 'UserGroups'
alma.conf.general.get_code_table(table)

# Get scheduled jobs and run history
jobs = alma.conf.jobs.get()
job_id = jobs['job'][0]['id']
run_history = alma.conf.jobs.get_instances(job_id)

# Get sets and set members
sets = alma.conf.sets.get()
set_id = sets['set'][0]['id']
set_members = alma.conf.sets.get_members(set_id)

# get profiles and reminders
depost_profiles = alma.conf.deposit_profiles.get()
import_profiles = alma.conf.import_profiles.get()
reminders = alma.conf.reminders.get()

Access Resource Sharing Partners

Alma provides a set of Web services for handling Resource Sharing Partner information, enabling you to quickly and easily manipulate partner details. These Web services can be used by external systems to retrieve or update partner data.

# get partners
partners = alma.partners.get()

Access Electronic

Alma provides a set of Web services for handling electronic information, enabling you to quickly and easily manipulate electronic details. These Web services can be used by external systems in order to retrieve or update electronic data.

# get e-collections
collections = alma.electronic.collections.get()
collection_id = collections['electronic_collection'][0]['id']

# get services for a collection
services = alma.electronic.services.get(collection_id)
service_id = services['electronic_service'][0]['id']

# get portfolios for a service
alma.electronic.portfolios.get(collection_id, service_id)

Access Task Lists

Alma provides a set of Web services for handling task lists information, enabling you to quickly and easily manipulate their details. These Web services can be used by external systems.

# get requested resources for a specific circulation desk
alma.task_lists.resources.get(library_id, circ_desk)

# get lending requests for a specific library
alma.task_lists.lending.get(library_id)

Attribution and Contact

Metadata

Release files for almapipy 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for almapipy 1.0.3
File Size Uploaded Provenance Actions
almapipy-1.0.3.tar.gz 22.8 kB Without provenance Details for almapipy-1.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for almapipy 1.0.3
File Interpreter ABI Platform Actions
almapipy-1.0.3-py3-none-any.whl Python 3 none any Details for almapipy-1.0.3-py3-none-any.whl

Total release size: 52.1 kB

Release files / almapipy-1.0.3.tar.gz

Download URL almapipy-1.0.3.tar.gz
Size 22.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b70a149626ee5dc77275c887154864d95cf2a5cdff634756388b1795fb3e3bfa
BLAKE2b-256 checksum
How to use checksums
5afda2a83f3654a73a987a596113237894840027f6f90b2f862d78f59505df29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Release files / almapipy-1.0.3-py3-none-any.whl

Download URL almapipy-1.0.3-py3-none-any.whl
Size 29.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1003d4ad06bd4f81b3f166ad4a753f3263a29bed1bbc3c14ac4dc08e784d6598
BLAKE2b-256 checksum
How to use checksums
76188d10e63247cb64b7ccc6756c653502490d0e5c5d71853a5da78c956fdc4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Security for almapipy 1.0.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page