Skip to main content

A parser for Datalang.

Project description

Datalang

Datalang it's an easy to use language with a similar syntax to YAML.
It has a fast parser!

How-to Install

You will need GIT or PIP

pip install datalang
# Or
git clone https://github.com/zsendokame/datalang; cd datalang; python setup.py

How-to Use

import datalang

datalangCode = """
str string: Value
int integer: 1
arr array: [Value 1, Value 2]

dictionary:
- Variable1: Value2
- Variable2: Value3
"""

print(datalang.load(datalangCode))

""" Output
{
    'string': 'Value',
    'integer': 1,
    'array': [
        'Value 1', 'Value 2'
    ],
    'dictionary': {
        'Variable1': 'Value2',
        'Variable2': 'Value3'
    }
}
"""

datalangDict = {
    'stringVariable': 'Value',
    'integerVariable': 1,
    'arrarVariable': ['value1', 'value2']

    'dictionaryValue': {
        'variable1': 'value2',
        'variable2': 'value3'
    }
}

print(datalang.dump(datalangDict))

"""
str stringVariable: Value
int integerVariable: 1
arr arrarVariable: [value1, value2]
- variable1: value2
- variable2: value3
"""

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

datalang-1.0.1.tar.gz (2.2 kB view details)

Uploaded Source

File details

Details for the file datalang-1.0.1.tar.gz.

File metadata

  • Download URL: datalang-1.0.1.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for datalang-1.0.1.tar.gz
Algorithm Hash digest
SHA256 136d38249c8d681a8cb7b936381c65c54efedcc1c3a951558c5dbf728ba40638
MD5 21c32819efd8bd8f9f3d7ee1ef08c045
BLAKE2b-256 3f82527365e04df077f6e3ce247caf543001c081978b02552ad01fcc70744a53

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