Skip to main content

Python API and command line interface for the Wilson Coefficient exchange format

Project description

Build Status Coverage Status

WCxf Python API and command line interface

This Python package provides a Python API and command line interface to perform the following operations on WCxf files (or dictionaries):

  • validation against EFT and basis files,
  • conversion between JSON and YAML,
  • translation between different bases, and
  • matching between different EFTs.

Installation

pip3 install wcxf

Command line interface

The CLI provides the following commands:

convert

usage: wcxf convert [-h] [--output [OUTPUT]] FORMAT [FILE]

Command line script to convert WCxf files between YAML and JSON.

positional arguments:
  FORMAT             Output format (should be yaml or json)
  FILE               Input file. If "-", read from standard input

optional arguments:
  -h, --help         show this help message and exit
  --output [OUTPUT]  Output file. If absent, print to standard output

translate

usage: wcxf translate [-h] [--output [OUTPUT]] [--format FORMAT] BASIS [FILE]

Command line script for basis translation of WCxf files.

positional arguments:
  BASIS              Output basis
  FILE               Input file. If "-", read from standard input

optional arguments:
  -h, --help         show this help message and exit
  --output [OUTPUT]  Output file. If absent, print to standard output
  --format FORMAT    Output format (default: json)

match

usage: wcxf match [-h] [--output [OUTPUT]] [--format FORMAT] EFT BASIS [FILE]

Command line script for matching of WCxf files.

positional arguments:
  EFT                Output EFT
  BASIS              Output basis
  FILE               Input file. If "-", read from standard input

optional arguments:
  -h, --help         show this help message and exit
  --output [OUTPUT]  Output file. If absent, print to standard output
  --format FORMAT    Output format (default: json)

validate

usage: wcxf validate [-h] TYPE [FILE]

Command line script for validation of WCxf files.

positional arguments:
  TYPE        Type of file to validate: should be 'eft', 'basis', or 'wc'
  FILE        Input file. If "-", read from standard input

optional arguments:
  -h, --help  show this help message and exit

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

wcxf-1.4.5.tar.gz (199.9 kB view details)

Uploaded Source

File details

Details for the file wcxf-1.4.5.tar.gz.

File metadata

  • Download URL: wcxf-1.4.5.tar.gz
  • Upload date:
  • Size: 199.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.3

File hashes

Hashes for wcxf-1.4.5.tar.gz
Algorithm Hash digest
SHA256 4382aea7da65b38144353b09a87e1d8583e35c6d97d078b21176bbb425914b64
MD5 6b6a546df28cab12afc4fb16a97377f3
BLAKE2b-256 9c530e1df73e26addada359ae95af2576d8f62342a6fd714259c49dd785efe3e

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