Skip to main content

medali is responsible for parsing, tagging and interpreting product metadata

Project description

https://travis-ci.com/TUW-GEO/medali.svg?branch=master https://coveralls.io/repos/github/TUW-GEO/medali/badge.svg?branch=master https://badge.fury.io/py/medali.svg https://readthedocs.org/projects/medali/badge/?version=latest https://img.shields.io/badge/License-MIT-yellow.svg

medali stands for MEtaDAta LIbrary and is responsible for parsing, tagging and interpreting product metadata.

Description

medali should be a place to establish version-controlled metadata definitions to guarantee homogeneous reading and writing of metadata within the scope of one product. It provides one module, the core module containing the class MetaData. This class offers a simple interface to actual metadata items, which are defined with respect to reference metadata. Such reference metadata can either be prepared manually as a dictionary or can be set in a configuration file. For mature products, the configuration files are stored in the folder in “src/medali/lib” under a product ID and a metadata version.

The Metadata class offers the following functionality:

  • initialisation via a metadata dictionary (+ optionally a reference metadata dictionary), via a product ID and metadata version combination, or via a configuration file path

  • setting and encoding (from a given data type to a string) the given metadata items

  • returning and decoding (from a string to a given data type) the given metadata items

  • checking if given metadata meets the criteria defined in the reference metadata (e.g., if the value is within a list of allowed values or if the value contains a specific string, …)

Installation

medali is a very light-weight package and has no dependencies. It can be installed via pip:

pip install medali

Adding products

A template configuration file for creating new reference metadata for a product can be found in the “templates” folder. The file should be named according to the metadata version and should be placed in a sub-folder in “src/medali/lib” named after the product ID. The reference metadata should have two sections:

  • “Metadata”: all needed tags and their data type (currently supported: string, boolean, datetime, integer, number)

  • “Expected_value”: should list metadata items that need to meet some specific criteria

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

medali-0.2.2.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

medali-0.2.2-py2.py3-none-any.whl (16.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file medali-0.2.2.tar.gz.

File metadata

  • Download URL: medali-0.2.2.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12

File hashes

Hashes for medali-0.2.2.tar.gz
Algorithm Hash digest
SHA256 a3e681121c1000b46e63079ca842b35d60ec9f2c4ae46bbfda3c18deb404ab0c
MD5 1982b2c709fc329d21a2c4cc62083c24
BLAKE2b-256 c149f79e126782719a4a4f90ecb834158a1343e38dcf396b6358bccea7583e5d

See more details on using hashes here.

File details

Details for the file medali-0.2.2-py2.py3-none-any.whl.

File metadata

  • Download URL: medali-0.2.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12

File hashes

Hashes for medali-0.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 284eb0b9e3558e9ec279ce4ecdfadb689282e4dbebf64f7224c46412da126354
MD5 7f6d8ac32a3366834f6a39a60bef04b7
BLAKE2b-256 6d2c7aa08ece73226c1c7ab4b7c01c5cdc6eed60c1e76586c2350858ddeff4fc

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