METS Reader & Writer
By Artefactual
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
Release files for metsrw 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| metsrw-0.7.0.tar.gz | 121.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| metsrw-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 214.2 kB
Release files / metsrw-0.7.0.tar.gz
| Download URL | metsrw-0.7.0.tar.gz |
|---|---|
| Size | 121.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5aa79345d01983ab212926247a700977e325fb87e4f47ab659ea61c1275e49fd
|
|
BLAKE2b-256 checksum How to use checksums |
c13a8c7cf141a4215bba644b4be4a5f0e5b464d65dbfa1465271cb08a780bfcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 3, 2026.
Transparency logRelease files / metsrw-0.7.0-py3-none-any.whl
| Download URL | metsrw-0.7.0-py3-none-any.whl |
|---|---|
| Size | 92.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a9cde54438a8cacb56bcf6f05b7526eae0f4d175441f0fcaddbfb3b33d6e3acb
|
|
BLAKE2b-256 checksum How to use checksums |
bccfd89c851bd05cd5f2b49fea4a6c1a25eae2bf18062708e217f57d0c554963
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 3, 2026.
Transparency log