Skip to main content

benten metadata tool

Project description

benten-meta

BENTEN metadata tool

Summary

This provides metadata tools for benten metadata format.

BENTEN provides two ways to present metadata.

  • metadata with flat key, json ( "@" is used to provide flat key to present hierarchical metadata)
{
    "@data_info@identifier@pid":"facility.xxxxx",
    "@data_info@identifier@proposal_number":"xxxxx"
}
  • hierarchical metadata, yaml
data_info:
  identifier:
    pid: facility.xxxxx
    proposal_number: xxxxx

This tool can convert metadata from json to yaml, or from yaml to json.

Install

$ pip install benten-meta

Usage

  • convert metadata from yaml to json
$ benten-meta.py convert_yaml2json example/metadata_hierarchy.yml test_flat.json
### benten-meta convert_yaml2json ###
==> convert from example/metadata_hierarchy.yml into test_flat.json
  • convert metadata from json to yaml
$ benten-meta.py convert_json2yaml example/metadata_flat.json test_hierarchy.yml 
### benten-meta convert_json2yaml ###
==> convert from example/metadata_flat.json into test_hierarchy.yml

License

Apache License 2.0

Author

Copyright (C) 2021 Takahiro Matsumoto (matumot@spring8.or.jp)

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

benten-meta-0.0.1.post4.tar.gz (11.0 kB view details)

Uploaded Source

File details

Details for the file benten-meta-0.0.1.post4.tar.gz.

File metadata

  • Download URL: benten-meta-0.0.1.post4.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for benten-meta-0.0.1.post4.tar.gz
Algorithm Hash digest
SHA256 fb151b853ffe70cdd4db9a05a16eb0e6e8ce60d96112428c7008ed4a11a0d57e
MD5 167275a83f84b15c8a40357d788c79cd
BLAKE2b-256 032392010abf2bbfc61a1264c36c0df2c6e0fd4beb03da6a7bba23191945ef9c

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