Skip to main content

alephmarcreader

General

Python library to read Marc obtained from Aleph, the catalogue of the library of the University of Basel.

This library supports Marc21, MARCXML, and AlephX.

Documentation

The docstrings can be displayed with pydoc (from the project root): pydoc alephmarcreader.abstractalephmarcreader.AbstractAlephMarcReader . For the inner classes such as Person, run pydoc alephmarcreader.abstractalephmarcreader.AbstractAlephMarcReader.Person.

Design

alephmarcreader.abstractalephmarcreader.AbstractAlephMarcReader provides methods to access Marc data. It is an abstract class that has two abstract methods __get_field and __get_subfield_text that have to be implemented in the subclass for the file format at hand.

Unit Tests

From the project root, run python -m unittest alephmarcreader.tests.test_[Marc[21|XML]|X]Reader.

Dependencies

  • pymarc: install with pip
  • lxml: install with pip

The library works both with python2 and python3.

Usage

Install the package with pip install alephmarcreader.

Example usage:

# import
from alephmarcreader import AlephMarcXMLReader

# Read data from local file
marc = AlephMarcXMLReader('example_file.xml')

# get some fields
author = marc.get_author()[0]
recipient = marc.get_recipient()[0]
date = marc.get_date()[0]

# print it
print(author.name)
print(recipient.name)
print(date)

For an exhaustive list of the API, use pydoc, as described above.

Metadata

Release files for alephmarcreader 1.1.0

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

Source distribution (sdist)

Source distribution for alephmarcreader 1.1.0
File Size Uploaded Provenance Actions
alephmarcreader-1.1.0.tar.gz 8.2 kB Without provenance Details for alephmarcreader-1.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 29.6 kB

Release files / alephmarcreader-1.1.0.tar.gz

Download URL alephmarcreader-1.1.0.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
72153831daea05511f087a4e4d4042b7d3595d83ae29763980a6a24719f98885
BLAKE2b-256 checksum
How to use checksums
b38e55403f45a3da54b6ccfab74181593af7ef0a87162a720eaf1cddc2db1520
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.5

Release files / alephmarcreader-1.1.0-py3-none-any.whl

Download URL alephmarcreader-1.1.0-py3-none-any.whl
Size 21.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
adcf90ca3d5dcd848b49dbeaf438a03326fa603ff1e9a2b1da882379dffe3ff2
BLAKE2b-256 checksum
How to use checksums
177465302a211465782a1667607d1fdc205073239a10d09c1ef15c6071927c2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.5

Security for alephmarcreader 1.1.0

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