Skip to main content

Encoding-decoding HELML format

Project description

HELML

helml-logo

Install

To install HELML, simply use pip:

pip install helml

Usage

from helml import HELML

# Example data structure
data = {
    "key1": "value1",
    "key2": [1, 2, 3],
    "key3": {
        "nested_key": "nested_value"
    }
}

# Encode the data structure into a HELML string
encoded_data = HELML.encode(data)
print(encoded_data)

# Decode the HELML string back into a data structure
decoded_data = HELML.decode(encoded_data)

encoded_data:

key1: value1

key2:
 :--:  1
 :--:  2
 :--:  3

key3
 :nested_key: nested_value

Features

Encode and decode data arrays to/from HELML.

API

HELML.encode(arr, url_mode=False)

Encode a data structure (list, dict, or tuple) into a HELML string.

  • arr: The input data structure to be encoded.
  • url_mode (bool, optional): A boolean indicating if the URL mode should be used. Defaults to False.

Returns:

  • str: The encoded HELML string.

HELML.decode(src_rows)

Decode a HELML formatted string or list of strings into a nested dictionary.

  • src_rows: The HELML input as a string

Returns:

  • dict: The decoded nested dictionary.

See also:

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

HELML-0.1.7.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

HELML-0.1.7-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file HELML-0.1.7.tar.gz.

File metadata

  • Download URL: HELML-0.1.7.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for HELML-0.1.7.tar.gz
Algorithm Hash digest
SHA256 41dcecf690723f453eda09b4b0e9b9f37fecdd48a9a6804e7f1202c6d312f462
MD5 3920dc17c4e1f578258b26714fc79abd
BLAKE2b-256 f700e9c6f5a7e09a2de4a778d9684cb1cca550b18167357d5d646d578cdf1c0a

See more details on using hashes here.

File details

Details for the file HELML-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: HELML-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for HELML-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9121ee0cdac7c3b969cc984936e4c954047ad460e559ab3b012e987a0c9c3102
MD5 ac361173ba1a01f1733bac6103fc80f0
BLAKE2b-256 d677ffe299634a1fe126cd984284e23d9d4204b19a597e939c5edbc1975aae7e

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