Skip to content

paveldedik/neon-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3986908 · Jun 17, 2022

History

61 Commits
Jun 16, 2022
Jun 17, 2022
Jun 17, 2022
Jun 16, 2022
Jun 16, 2022
Sep 24, 2019
May 14, 2016
Jul 13, 2021
Jun 16, 2022

Repository files navigation

NEON for Python

Test

NEON is very similar to YAML. The main difference is that the NEON supports "entities"(so can be used e.g.to parse phpDoc annotations) and tab characters for indentation. NEON syntax is a little simpler.

Example of Neon code:

# neon example

name: Homer

address:

    street: 742 Evergreen Terrace
    city: Springfield

children:

    + Bart
    + Lisa
    + Maggie

entity: Column(type=integer)

Installation

To install NEON parser for Python, simply run:

pip install neon-py

Quick start

Decoding NEON config files is super easy:

import neon

with open('/path/to/config.neon', 'r') as fd:
    config = neon.decode(fd.read())

Links