A smart, modular and readable configuration file format for complex multifile solutions.
Project description
Neat Object Notation 0.5.13
pip install neat-notation
To load your .neat file into python, call neat_notation.load(filename:str)
. It will return a dictionary/list containing the content of your file.
A smart, modular and readable configuration file format for complex multifile solutions.
Comments
| Any lines which are to be commented out must start with a pipe character.
| The pipe must ALWAYS be at the beginning of the line for comments.
Global Scope
By default the global scope of a Neat config file is a dictionary, if you wish to specify otherwise you must put this somewhere in your .neat file on its own line
~list
Labeled Structures
[This is where you write the key associated with your dictionary]
"This is a key to an inline dictionary":{"This is the key to an inline list":()}
| This [-] token denotes the end of a dictionary.
[-]
<This is where you write the key associated with your list>
| The line below is the 0th index of this labeled list and is a list with a single item,
| That single item is an empty dictionary
({})
| This <-> token denotes the end of a list.
<->
Unlabeled Structures
If you wish to create an unlabeled structure vertically you can do so like this:
~list
{
"Some key":29873198273
}
Another example:
<section name>
{
[inner section name]
"some key": True
[-]
"another key": "abc"
}
<->
Modules
Importing only specific sections of a module:
| This file is called filename.neat
<section name>
{
[inner section name]
"some key": True
[-]
"another key": "abc"
}
<->
|this is where we are importing the module
mod filename : 'section name'.0.'inner section name'
| Alternate syntax
* foldername.filename : 'section name'.0.'inner section name'
Importing a whole module:
|this file is called module.neat
[section]
1:"abc"
[-]
| This is where we import module.neat
mod module
[another section]
"def":2
[-]
| Result:
| {"module":{"section":{"1":"abc"}},"another section":{"def":2}}
Alias
Aliases can be used to add items to sections outside of that section and its parent. The left hand side of the : is the alias name. The right hand side of the : is the alias path.
<section name>
{
[inner section name]
"some key": True
[-]
"another key": "abc"
}
<->
| this is the alias declaration
alias alias_name : [section name] 0 [inner section name]
| the name of the alias, in this case alias_name, marks the start of an alias section.
alias_name
"some other key": false
| The /-/ token marks the end of an alias section
/-/
| Result:
| {"section name":[{"inner section name":{"some key":True,"some other key":False},"another key":"abc"}]}
Environment Variables
Environment variables can be used in strings and section keys.
| For this example lets say ENVIRONMENT_VARIABLE_NAME = "3"
[:{ENVIRONMENT_VARIABLE_NAME}:]
":{ENVIRONMENT_VARIABLE_NAME}:" : "this is ENVIRONMENT_VARIABLE_NAME's value -> :{ENVIRONMENT_VARIABLE_NAME}:"
[-]
| output:
| {'3': {'3': 'This is ENVIRONMENT_VARIABLE_NAME's value -> 3'}}
To denote an environment variable wrap the variable name in :{
and }:
it works the same way as an f-string in python.
Auto-Increment
When inside a dictionary you can prefix values with - value
to autoincrement their key as an integer from the last integer key you set. For example:
[section]
- "foo"
- "bar"
- 123
7: true
- 0.1
- -22.2
- -12
[-]
| output:
| {"section":{0: "foo", 1: "bar", 2: 123, 7: True, 8: 0.1, 9: -22.2, 10: -12}}
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
Built Distributions
File details
Details for the file neat_notation-0.5.13.tar.gz
.
File metadata
- Download URL: neat_notation-0.5.13.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bc705dede6e5591e05cdb03a15eddd2d1a993954763459f963dcd126d16c8cf |
|
MD5 | 957f963756f409b19c8c12d5786850f0 |
|
BLAKE2b-256 | 38dc1c4dabb775bd0ae967e40f906a07785b36d2ce70c418bac2f5e4dc1dee5f |
Provenance
File details
Details for the file neat_notation-0.5.13-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: neat_notation-0.5.13-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a0a4b430dddb1c0cae3dfb65906f84633062cfa363077967e81b9c61d0b23a0 |
|
MD5 | 2b93b3241ca0eda02cc9d91e6d3e638e |
|
BLAKE2b-256 | 5f6e2bc8c96fef8f291c756c7db87a1033f868f89f6401d562bf6b70375b8364 |
Provenance
File details
Details for the file neat_notation-0.5.13-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: neat_notation-0.5.13-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71f332327e6f5e9ae661b118acd86afe2ecf921d2ce806cb9b268b9c74e41b61 |
|
MD5 | 80bc7503065bfd28bc018d6362db58b3 |
|
BLAKE2b-256 | 5a46dc027acd5c60fe7e9a548465a04a158cc5d1230a27ad02b7d57781b03cec |
Provenance
File details
Details for the file neat_notation-0.5.13-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: neat_notation-0.5.13-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e6ad024cdf9c4f9ee816b5695a6ba44b3ed68f5b3c28741532bb2dc481fd746 |
|
MD5 | 6d56ca04ecd3f4a2a0e7d07c148c9c06 |
|
BLAKE2b-256 | bf606fd8d4f61b6d0625370847952721b98f7a23ee30de335071cc133c7bfab2 |
Provenance
File details
Details for the file neat_notation-0.5.13-cp311-none-win_amd64.whl
.
File metadata
- Download URL: neat_notation-0.5.13-cp311-none-win_amd64.whl
- Upload date:
- Size: 209.0 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d09acf86dbf682cfdf6c47fa9115728514d33bcbe10859f338dac2bc6e2fb92 |
|
MD5 | 01238bc33f6643126b13606d08e62178 |
|
BLAKE2b-256 | edce7e3dd3e88b149c7fdfc7169343e2f2220cf10bea5ba86fc795c80900258f |
Provenance
File details
Details for the file neat_notation-0.5.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: neat_notation-0.5.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2ff244d2eb77f15528085f28dd4da69ffb0ece46a15274231c363825802e73c |
|
MD5 | 2edff94495a44b30daa5f32ad1f71757 |
|
BLAKE2b-256 | d6d91972c73d0e619cbf0a5541cbcd3978d7b966a1dab71aa7b8093e37615f0c |
Provenance
File details
Details for the file neat_notation-0.5.13-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: neat_notation-0.5.13-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 610.6 kB
- Tags: CPython 3.11, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cf12ef61d45905badba7c62dcaddaa5b578532ac1862db5d2ad94abb2b0a0d2 |
|
MD5 | 4e169fcabb8565f0cda3acd41c0761e2 |
|
BLAKE2b-256 | 4710525467a45b65af27d9129bbff4d066f837326574a0cdcb0e683cc3c5dc28 |
Provenance
File details
Details for the file neat_notation-0.5.13-cp310-none-win_amd64.whl
.
File metadata
- Download URL: neat_notation-0.5.13-cp310-none-win_amd64.whl
- Upload date:
- Size: 209.0 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf44062326691d99ec90f7809d78dc50ea361021a04791064f3937d063c9e985 |
|
MD5 | 8f59cb6f5dff9ae7543ed8b166193364 |
|
BLAKE2b-256 | 104b5c8366c8aa80b6e55d35e5b644e97474e57ecc8b4e2e1446ba5af8384cb7 |
Provenance
File details
Details for the file neat_notation-0.5.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: neat_notation-0.5.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4f1dcb3f9f7e639613ff7fe27a1da07ed7c876b265e77a8bf26252ec8ad9309 |
|
MD5 | 011722d853c849effd9a30f64fd338f1 |
|
BLAKE2b-256 | 595473b64347dfba735a28599847c8dff03e78f7708e5c9f03c495b394933a3a |
Provenance
File details
Details for the file neat_notation-0.5.13-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: neat_notation-0.5.13-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 610.6 kB
- Tags: CPython 3.10, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46999325f8e9d26774f28092c08cd82a9745c956bf1bf300c0a5ce3e132b616a |
|
MD5 | fd76a9ffa0403209f112903511870f77 |
|
BLAKE2b-256 | 2e1316dc5a6eb912bdb7a2f8c4fbbc68e0f5b13053cc71d76ab26fae43ba4b0f |
Provenance
File details
Details for the file neat_notation-0.5.13-cp39-none-win_amd64.whl
.
File metadata
- Download URL: neat_notation-0.5.13-cp39-none-win_amd64.whl
- Upload date:
- Size: 209.0 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e831044333aac636821eecac1f3083770fdbbb6a1d48658f02be7cb0fa928fc |
|
MD5 | f6dcdced736bb30af68b0b717fe541d8 |
|
BLAKE2b-256 | 253e1f1cc1a8a2f54255635da8a37f30154e356cdf33aa5273df4499beb216ad |
Provenance
File details
Details for the file neat_notation-0.5.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: neat_notation-0.5.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aac5becc7157e49bc4eb5860784bc29240d9075d0f6feea3c9257ad4c987f7ae |
|
MD5 | 1905e988b79ad39cae9a2dc78039a8bb |
|
BLAKE2b-256 | 6892936d1cf52c51f4d89607323f9733a5e7088dda60e32bea8fda96e4cadbe7 |
Provenance
File details
Details for the file neat_notation-0.5.13-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: neat_notation-0.5.13-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 610.6 kB
- Tags: CPython 3.9, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ae436281e017035565ad622f1d451ade51625be53e4972b729904894c482572 |
|
MD5 | df06eaa7e1aba5cf8246b5f10c4151f7 |
|
BLAKE2b-256 | ce16d5934af607da7462d7a5a979e26d6cc2d2d502d82471b498b720a6c903dd |
Provenance
File details
Details for the file neat_notation-0.5.13-cp38-none-win_amd64.whl
.
File metadata
- Download URL: neat_notation-0.5.13-cp38-none-win_amd64.whl
- Upload date:
- Size: 209.0 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab3e29c95c5fd952f6fa543e2b0e6b629c021915001098c9064e13fdf17ea975 |
|
MD5 | a27ff1a0f82468faeafed3976efd4953 |
|
BLAKE2b-256 | 6e739a99677ce8dc230e8816b589086777ddff8670481678d90b71e245a80514 |
Provenance
File details
Details for the file neat_notation-0.5.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: neat_notation-0.5.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d06cc98737ed909482db8c54c5d137e99862d43ff857c5ed64844b0597915dcb |
|
MD5 | 3952068c78a61373e36998255d1ad1af |
|
BLAKE2b-256 | 81c08a8f7e37554998c325ab76fdb3622dd88fc4bca0bb201ec6222e304dcdb0 |
Provenance
File details
Details for the file neat_notation-0.5.13-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: neat_notation-0.5.13-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 610.9 kB
- Tags: CPython 3.8, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a3d756a06da38986118ed054d3f7e96da88b8fc0c6eae33ab583d439b35b2a1 |
|
MD5 | 9e22b00f02098115ee545c7944c4da93 |
|
BLAKE2b-256 | 4fbb9edaee2742b27364be74def4533a19e517f665628bb230379d7fe530562c |
Provenance
File details
Details for the file neat_notation-0.5.13-cp37-none-win_amd64.whl
.
File metadata
- Download URL: neat_notation-0.5.13-cp37-none-win_amd64.whl
- Upload date:
- Size: 209.0 kB
- Tags: CPython 3.7, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db8d826b2f211328e7f294a61a9cd6faeeeb01869ab562186e1b2264b422389d |
|
MD5 | 53a90f3351203524ab7d22fd01884bd1 |
|
BLAKE2b-256 | 9659852373ddbf360187458a8f2049db7a158024e6002e441b764f559ccf656c |
Provenance
File details
Details for the file neat_notation-0.5.13-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: neat_notation-0.5.13-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c8acaa16d1f42d3a18e7ede5ae879c208abc073dc319b1362cd0a2bddb320dc |
|
MD5 | 556481af4871791060ab156dcdd91ac7 |
|
BLAKE2b-256 | 85a74564a2dd7afa3907c943cb7aac416903582ed3ce63973879a524d6e67735 |
Provenance
File details
Details for the file neat_notation-0.5.13-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: neat_notation-0.5.13-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 611.0 kB
- Tags: CPython 3.7m, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69a442a1316806da4c38d02ce6d481db4762f8e16b3b4d6d5d6cc901e0043862 |
|
MD5 | 41725231d20be84ce6d8c355298eb86c |
|
BLAKE2b-256 | f29747dfc155d3555580bbd49ec6ccd27b65df135420bf30d19f9d048fbde4fc |