Skip to main content

A CLI tool to convert YAML file to Python module for better load performance

Project description

yamltopy

PyPI PyPI - Downloads GitHub release (latest by date)

Install

pip install yamltopy

Usage

usage: yamltopy [-h] [-i INPUT] [-o OUTPUT] [-n NAME] [-v]

Convert YAML configuration file to a Python modulefor better performance

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        The input Yaml file (YML or YAML)
  -o OUTPUT, --output OUTPUT
                        The output Py file
  -n NAME, --name NAME  The name of the exported variable containg the Yaml data
  -v, --verbose

Convert YAML file to PY:

yamltopy -i path/to/file.yaml -o path/to/output.py -n NAME_OF_VARIABLE

You can import the output file (if modules set up properly):

from path.to.output import NAME_OF_VARIABLE

print(NAME_OF_VARIABLE)

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

yamltopy-1.0.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

yamltopy-1.0.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file yamltopy-1.0.0.tar.gz.

File metadata

  • Download URL: yamltopy-1.0.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for yamltopy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 615fa4880468e15d24fb3e2ca0efeadb12e4e49b7f89371f4810628c21ec9ec4
MD5 3435168e9cfab086ffa23de1be906a5c
BLAKE2b-256 9be14baa0110044a9299aad61d79290a4fddafc8241d180a980a00c40f5c44b2

See more details on using hashes here.

File details

Details for the file yamltopy-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: yamltopy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for yamltopy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb93eba694aef80c01763de6e412426fd0349b2ea7d5c346fd146562641b823f
MD5 189577a28bcc2575649b18eae81020cb
BLAKE2b-256 ebbcd9311cb056bdf76bfe72bffc6ef7558e0a9f7d9dec8c335dfeaec333d0e5

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