A smart, modular and readable configuration file format for complex multifile solutions.
Project description
Neat Object Notation 0.6.16
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}}
Escape Character
Escape characters can be used to use syntax characters inside of their syntaxes or to use the combination of characters that creates a token such as the environment variable wrapping token as their literal characters, like so:
[section\] key\]]
"\:{this is my key\}:" : 123
[-]
| output:
| {'section] key]': {':{this is my key}:': 123}}
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.6.16.tar.gz
.
File metadata
- Download URL: neat_notation-0.6.16.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58bdcb417355cc67c45655e3d95393a5577958e8f813a1a6a32dcbfb7616bac9 |
|
MD5 | 1fb0e52e85cc48e22111da534ce85c9a |
|
BLAKE2b-256 | c70d86842a4833e5b8e7ce552bb514602a3844aa42717ba775597d6ac23117eb |
File details
Details for the file neat_notation-0.6.16-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: neat_notation-0.6.16-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 | a5d66f6ba44ffae470e2c7b9825af1af6d9ec49c7324ff6b02ec833399427cc6 |
|
MD5 | 282ea9b4ea5abaf8b879475a7fe08ec6 |
|
BLAKE2b-256 | c0355e3517e22699ca6299407061fac540a4d4150887bb2ccaf9b9418551b562 |
File details
Details for the file neat_notation-0.6.16-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: neat_notation-0.6.16-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 | aa6cdbd687ca38a3403491c3075b82610d4c3b4d3679c951f0be1ff6aeca5b8e |
|
MD5 | 9e17fe9437bc855513f9f1db22f745d9 |
|
BLAKE2b-256 | 5a0b2ed77b7fa64778d5ba5a201017534c95b193559dbd13e2e1240616ba4753 |
File details
Details for the file neat_notation-0.6.16-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: neat_notation-0.6.16-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 | 5b75aab00f5b7bdaad6401b592866e997453aa94578180f3e2b92048e24cc7d4 |
|
MD5 | ba3f973051f5104134b78352f10caf46 |
|
BLAKE2b-256 | 73ab0741f351302f5cc71694a6b03bb1b4521bc65ced641923e952193ec4a469 |
File details
Details for the file neat_notation-0.6.16-cp311-none-win_amd64.whl
.
File metadata
- Download URL: neat_notation-0.6.16-cp311-none-win_amd64.whl
- Upload date:
- Size: 209.2 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 | b1d1886dd37d10bf0274ae27ac0a162224c514b402b997ef1665ff3a3562e55f |
|
MD5 | bb908083151e2780840bbc4ecbc67d89 |
|
BLAKE2b-256 | 5be82388ad0ee64132ae971364375c5d0ef8b17021122d677f5f1e19a838d047 |
File details
Details for the file neat_notation-0.6.16-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: neat_notation-0.6.16-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 | fabf3af86378df6d6da02fb83598167afac7aeb0cc624cb30f0fb90e5a112fcf |
|
MD5 | b52bd173090101e5f129df0d0ba86c8f |
|
BLAKE2b-256 | 16e8b3375f3c696bfb35439ba1ce73483ee29ecdc918ccfaad6a9fab3aea9b5f |
File details
Details for the file neat_notation-0.6.16-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: neat_notation-0.6.16-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 610.7 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 | a18a7c9f95e8eec84d4fc22800cb181159fa2b32f8f019a6221088667cbc4fcc |
|
MD5 | ebd1b11457cf0bfcd44547df8767c40a |
|
BLAKE2b-256 | 808398ecdf48f0808928c516eb51c4050a64395f6e882ffc2a84bee96f454eed |
File details
Details for the file neat_notation-0.6.16-cp310-none-win_amd64.whl
.
File metadata
- Download URL: neat_notation-0.6.16-cp310-none-win_amd64.whl
- Upload date:
- Size: 209.2 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 | 095df2b2a275a35b40d65b4eeecf5a31742160de0a557581a7a150c7387b729c |
|
MD5 | 95d8479103895b37ca48aeca3b2644d0 |
|
BLAKE2b-256 | 8171ae03dc213e31c0974d91e49fa3a4318850f31a1f09e448a7b1ed0491d637 |
File details
Details for the file neat_notation-0.6.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: neat_notation-0.6.16-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 | c086834cf96ee66ed042d13ba73d626a2f22e05adc0784b596f2ac224bc6764c |
|
MD5 | f17c96297eea91c74a5079c31701726d |
|
BLAKE2b-256 | 4baed617f016fd47fd17f0e61cf6bf943b87111b2ba49fc32b5bdc5118a5e6eb |
File details
Details for the file neat_notation-0.6.16-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: neat_notation-0.6.16-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 610.7 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 | e3e2b9bbcc751df52e5c5bfab67233353e65b783db7008a3b6c5307bf5a75458 |
|
MD5 | 4fe04df607de6643c9bd55b0694c3b9a |
|
BLAKE2b-256 | b066e4ee0ef0f633d3dbced88c11090a57bd77c3973847c79f736fe54186eb70 |
File details
Details for the file neat_notation-0.6.16-cp39-none-win_amd64.whl
.
File metadata
- Download URL: neat_notation-0.6.16-cp39-none-win_amd64.whl
- Upload date:
- Size: 209.2 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 | df52a0349500eeadb351311fdb55a8061a10cb51282872dfb28513166ef664ee |
|
MD5 | 08f39c650deeed729bed43a1a497cbcb |
|
BLAKE2b-256 | 22a2deb49efb3d85a23131f1c7dfa8d7d6643d3f4ce992838624f8f04e70b76e |
File details
Details for the file neat_notation-0.6.16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: neat_notation-0.6.16-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 | 9a630d00cee7390651a8384e9173706e7ea8591da15226b9060a000eb2a88f96 |
|
MD5 | c9a0f0f2a295ff836edfc1a5c63683f7 |
|
BLAKE2b-256 | 51130e9d416dca9eed08cbe82b01c02fdd2d1caf51d8adac1715eebc076f818a |
File details
Details for the file neat_notation-0.6.16-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: neat_notation-0.6.16-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 610.7 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 | 8d67424cd9fcb0897dc05ae66287808922c508e8586aaee20e776fa15b8015a6 |
|
MD5 | 7533a889cfc8c3ea8185c881fd87d48d |
|
BLAKE2b-256 | 1f5569c6a31f9d49c15dd01446998f3ea2759c3e842604a504b2b01a0089057b |
File details
Details for the file neat_notation-0.6.16-cp38-none-win_amd64.whl
.
File metadata
- Download URL: neat_notation-0.6.16-cp38-none-win_amd64.whl
- Upload date:
- Size: 209.2 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 | 789a366d92eba2b65f351ae38d91c573f390ec225abf5741eeeea926c60e2105 |
|
MD5 | 91d07e905dbcd3733242f42a12de8d6c |
|
BLAKE2b-256 | fb4b2560fad1341a2729df14207ee5b5cad9cee8486f736989d79b1120f2b652 |
File details
Details for the file neat_notation-0.6.16-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: neat_notation-0.6.16-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 | c5fd2c620910985189e8d933f78187fad631490a11ebc17533be0a807fbb3f9b |
|
MD5 | 84c618b3f64d569bf79141ee1fa9f258 |
|
BLAKE2b-256 | 1ed547aa32901a4d55b9953ff434c39dfdea05f4b2f26bd2e40e38911c141ac4 |
File details
Details for the file neat_notation-0.6.16-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: neat_notation-0.6.16-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 611.1 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 | 24f40e4cd69e011fb36cc4c0655627de128a43b09d4f8e4705d59357fa972ef7 |
|
MD5 | d37cf32fea54a8e56f76bcaaded3bc37 |
|
BLAKE2b-256 | c799f18fac7cb3639e2f62f709fa9a06e3eb8d0b510cdbf5342e66f6494650ac |
File details
Details for the file neat_notation-0.6.16-cp37-none-win_amd64.whl
.
File metadata
- Download URL: neat_notation-0.6.16-cp37-none-win_amd64.whl
- Upload date:
- Size: 209.1 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 | f27db9e1849a3d4293e264d6a1f2f1eafde56663f24253bbb58c884d328cfc51 |
|
MD5 | 1108f44ba4e6806ef8d270d5f05bc9fd |
|
BLAKE2b-256 | 3153c56ab3e33e2f189fc6c70cf9a6247eb5a87bdbbf9f01f1f7b93095123102 |
File details
Details for the file neat_notation-0.6.16-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: neat_notation-0.6.16-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 | 719bc6866f48bc4bfdc54156647b4bb68626b2849f9b3e451aa6ba77692671ab |
|
MD5 | 24383c3e3f0146a50f9e0910a878a8ad |
|
BLAKE2b-256 | 4d6c4e483fb95c3ae6128620b2aa4335f7bfed859a5373db0d40fbabdb300834 |
File details
Details for the file neat_notation-0.6.16-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: neat_notation-0.6.16-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 611.1 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 | c16a71508dd59f772fdedca8229a0ff7be494fdb5d6c854a2a56c9eb639c1cc0 |
|
MD5 | 0c3ede5c4bb347aeef6bf52bdbe0ac05 |
|
BLAKE2b-256 | 729822f6176fc405306170ab8ea256837c3c356701e9109818a47443b333f4d6 |