Skip to main content

Library for dealing with METS files.

Project description

METS Reader & Writer

By Artefactual

PyPI version GitHub CI codecov

METSRW is a library to help with parsing and creating METS files. It provides an API, and abstracts away the actual creation of the XML. METSRW was initially created for use in Archivematica and is managed as part of that project.

You are free to copy, modify, and distribute metsrw with attribution under the terms of the AGPL license. See the LICENSE file for details.

Installation & Dependencies

METSRW can be installed with pip.

pip install metsrw

METSRW has been tested with:

  • Python 3.9
  • Python 3.10
  • Python 3.11
  • Python 3.12

Basic Usage

Read a METS file

mets = metsrw.METSDocument.fromfile('path/to/file')  # Reads a file
mets = metsrw.METSDocument.fromstring('<mets document>')  # Parses a string
mets = metsrw.METSDocument.fromtree(lxml.ElementTree)  # Parses an lxml.Element or lxml.ElementTree

Create a new METS file

mets = metsrw.METSDocument()

Contributing

METSRW is in early development and welcomes feedback on the API and overall design! Design goals, use cases, and a proposed API are in the Github wiki

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metsrw-0.6.0.tar.gz (118.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

metsrw-0.6.0-py3-none-any.whl (92.1 kB view details)

Uploaded Python 3

File details

Details for the file metsrw-0.6.0.tar.gz.

File metadata

  • Download URL: metsrw-0.6.0.tar.gz
  • Upload date:
  • Size: 118.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for metsrw-0.6.0.tar.gz
Algorithm Hash digest
SHA256 5e75927b53ad6ef6b60e0f55d0779dd8d48f0ecd99c262558f08fb748153b323
MD5 1b93d133a33196799881bf1c295a7ce5
BLAKE2b-256 8a287b37addba5195856ceef08d5df61b1ed8598fcf4762188bc23ac4644442f

See more details on using hashes here.

Provenance

The following attestation bundles were made for metsrw-0.6.0.tar.gz:

Publisher: release.yml on artefactual-labs/mets-reader-writer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file metsrw-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: metsrw-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 92.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for metsrw-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad5d51587bb9706181942a5c54f934a9335b551184eb0fb4bad7055ab0625138
MD5 246353cb3a31db415fd01ecdfd3ad595
BLAKE2b-256 be39f400543b958eb30c762e1a5e012cd0bbca4c62d73460309920965189c8fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for metsrw-0.6.0-py3-none-any.whl:

Publisher: release.yml on artefactual-labs/mets-reader-writer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page