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]

dictionaryValue:
- 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.4.tar.gz (2.2 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: datalang-1.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 78cd897341ea3507e48707ba2a9356e9297158b88bd348e753841d5b84355e07
MD5 d239d659102dfa1f094f62c2279c4222
BLAKE2b-256 57c3ba78d2328bdcf0799dac90af99a66820df67fd270cbc6d17467284a7c227

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