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.6
  • Python 3.7
  • Python 3.8
  • Python 3.9

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

Uploaded Source

Built Distribution

metsrw-0.5.1-py3-none-any.whl (92.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: metsrw-0.5.1.tar.gz
  • Upload date:
  • Size: 118.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for metsrw-0.5.1.tar.gz
Algorithm Hash digest
SHA256 b7a1954baae213a6af53edcb3800a9424e45ac2a92dc0fcaa782c04f05dac932
MD5 bbdd0f131cb2d9b79786034f3d7b62da
BLAKE2b-256 79461fb2881241123f79c0d4b609ef1edb29585fdf754a7226a2375a56602fcc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: metsrw-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 92.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for metsrw-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fadf4bde1df82a47d2ed82304a0d3ae65adeec33303565a874ba82f562b53e56
MD5 a25266a9e8547a0d0e1e70f82879186f
BLAKE2b-256 38123ab85cf5be63d0f7da84ce52ec02a7d77725798a0ecf2fba976dc56af340

See more details on using hashes here.

Supported by

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