Skip to main content

Python lib to deal with EML (Ecological Metadata Language)

Project description

pyemllib

Release Build status codecov Commit activity Docs Code style with black Imports with isort License

This package is a python lib to help dealing with EML - Ecological Metadata Language.

It's built uppon dataclasses generated with xsdata from EML xsd hence heavily relies on xsdata capabilities

For history reasons, i also provide the former pyxb and generateDS (built with py38) that i used to use on my projects but that i now find more cumbersome to use than the dataclass implementation. They might be useful anyway !!

NB: This lib is currently developped under a local gitlab forge and will be release on github on important releases

Main features

  • Deserializes EML files to python objects
  • Serializes pure python objects to EML as XML string / files
  • Checks validity of EML generated against xsd
  • Generates a markdown/html DataPaper from suitable EML files

Very simple usage

from emllib import EMLizer

# instantiate EML object document
my_eml = EMLizer(package_id="ID", title="Mon titre", lang="fr", creator="Mon Createur", abstract="Mon abstract")

# print EML xml formatted string
print(my_eml.to_string())

# dump EML xml formatted to file
my_eml.to_file('path/to/file/eml.xml')

# Inspect validity
if my_eml.validate():
    print("This EML file seems valid")
else:
    print("This EML file does not seem valid!")

Recommended usage

The EMLizer helper class is just a wrapper to help quickly basic EML files. Nevertheless in more complex or sophisticated situations, i recommend to use the dataclass API directly under emllib.dataclass.eml220


Repository initiated with fpgmaas/cookiecutter-poetry.

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

pyemllib-0.1.0.tar.gz (767.6 kB view details)

Uploaded Source

Built Distribution

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

pyemllib-0.1.0-py3-none-any.whl (918.4 kB view details)

Uploaded Python 3

File details

Details for the file pyemllib-0.1.0.tar.gz.

File metadata

  • Download URL: pyemllib-0.1.0.tar.gz
  • Upload date:
  • Size: 767.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.9.12 Linux/5.4.0-132-generic

File hashes

Hashes for pyemllib-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ecfe07bb9937f8a19e46717fa64849df1915dd22e06294a29f2e306025477ffc
MD5 43b2e17538657677e6115ac4a43795b3
BLAKE2b-256 20ce5a3f25efc6ffcb27c471acca677093b492f0f0563f6c32b6f08f291da42b

See more details on using hashes here.

File details

Details for the file pyemllib-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyemllib-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 918.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.9.12 Linux/5.4.0-132-generic

File hashes

Hashes for pyemllib-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8585ed7d28e0100c28ca1454f5d03e6bf7828fecab9aaccc9572119bb4fa910f
MD5 340e69f542321e00bf077744491796ac
BLAKE2b-256 ac4b42edce56bc645e2950f51e7c40c229d8e5b1fa52a405cec6161b6dc2fe99

See more details on using hashes here.

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