Skip to content

JONF parser/formatter in Python

License

Notifications You must be signed in to change notification settings

whyolet/jonf-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JONF parser/formatter in Python

NOTE: This is an early alpha version

# pip install jonf

import jonf, textwrap

text = textwrap.dedent(
    """\
    compare =
      - true
      = true
    """
).rstrip()

data = {
    "compare": [
        "true",
        True,
    ]
}

# TODO:
# assert jonf.parse(text) == data

assert jonf.format(data) == text

print(jonf.format(data))

Output:

compare =
  - true
  = true

Releases

No releases published

Packages

No packages published

Languages