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.6.1.tar.gz (118.8 kB view details)

Uploaded Source

Built Distribution

metsrw-0.6.1-py3-none-any.whl (92.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: metsrw-0.6.1.tar.gz
  • Upload date:
  • Size: 118.8 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.1.tar.gz
Algorithm Hash digest
SHA256 fca9029909e617cb5560433e3448ac6b8a08b13730b4e8ab1cc861e9904c5868
MD5 f151b74c54527105034e2d227ff73758
BLAKE2b-256 1f206dfd2f5332255061bcf41c027523a3c37797726151f3807fca12d6ef5df5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: metsrw-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 92.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e3420228915c47f0040f492759a4a24f785fee446c029f46a33733b88cc91930
MD5 aadf9f8d42f7e36ce8e3a78c5ac18867
BLAKE2b-256 d356845b16560050854b22c2bbe7e1fd318467a6d8084223dc4e2777d12549f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for metsrw-0.6.1-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 Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page