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 is tested with the all the supported versions of Python.

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.7.0.tar.gz (121.5 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.7.0-py3-none-any.whl (92.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: metsrw-0.7.0.tar.gz
  • Upload date:
  • Size: 121.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for metsrw-0.7.0.tar.gz
Algorithm Hash digest
SHA256 5aa79345d01983ab212926247a700977e325fb87e4f47ab659ea61c1275e49fd
MD5 ee222fa7ca64d5afc78aae2d8d59d9a4
BLAKE2b-256 c13a8c7cf141a4215bba644b4be4a5f0e5b464d65dbfa1465271cb08a780bfcf

See more details on using hashes here.

Provenance

The following attestation bundles were made for metsrw-0.7.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.7.0-py3-none-any.whl.

File metadata

  • Download URL: metsrw-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 92.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for metsrw-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9cde54438a8cacb56bcf6f05b7526eae0f4d175441f0fcaddbfb3b33d6e3acb
MD5 62f836a4e13cc7343a3edf7302f0046d
BLAKE2b-256 bccfd89c851bd05cd5f2b49fea4a6c1a25eae2bf18062708e217f57d0c554963

See more details on using hashes here.

Provenance

The following attestation bundles were made for metsrw-0.7.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