A smart, modular and readable configuration file format for complex multifile solutions.
Project description
Neat Object Notation 0.3.1
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"}]}
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
Hashes for neat_notation-0.4.13-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2aed4b49bf756e1e04b1e9d992bc6fe219c120f1d0449c4587a96e3c9efda78 |
|
MD5 | 95194ff668b0c8e7ca9376293e898881 |
|
BLAKE2b-256 | 82b97232adca30f1a75ec9e5a569f997bf9434de05a63c3b88b22f5f939b4d14 |
Hashes for neat_notation-0.4.13-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 779870fc16601bf4803a60ae1b23a5adf834f5429c9b1c8bde23a671d2da0343 |
|
MD5 | 38802684232f012d4983f036f353e5d9 |
|
BLAKE2b-256 | 889cf9434a2c8b24f54734f406a2f45b2557db115ed1d204de75a551bc5c7ad2 |
Hashes for neat_notation-0.4.13-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e70c3ac0d181bc252546d8a6b43e236afb413df5ba0e2aa2c07c61397f23f4f |
|
MD5 | ac80a14cb84b2b5956321431135b56d3 |
|
BLAKE2b-256 | 9a5e1a6aa4b7480bffb9da00354f5cb2138732c2d783f77677bd047291003087 |
Hashes for neat_notation-0.4.13-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b4e4e74686c61d53dda90b0f78aa8846fa47444405c3c6b2699bfe82f99185e |
|
MD5 | c4c9564b1e231af777d59b78c35a3bc2 |
|
BLAKE2b-256 | 2e7e787177a9a72f563f9f67714963048328af04a5f65de2ba127b90ac831f79 |
Hashes for neat_notation-0.4.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e11e34172e585a89ba16e5e2c5ebfc13b246a88352118701346d1657ac3634e |
|
MD5 | dec2cbcb685856c7fe9bc9903a450335 |
|
BLAKE2b-256 | 7d065c0a3aed9d3448e9da621ff45742b3cdf1cd0bc3a6d5b95be9b0a37c91b4 |
Hashes for neat_notation-0.4.13-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a717009896dbf0454bb811b65348cf1372aebc014af548ce6cbd2242f49f1925 |
|
MD5 | 8eb2cf6b663002e487f999dc4a09a841 |
|
BLAKE2b-256 | ee856ea114e065cb1795e659c7637f656c70f9a5c26df213ef1dae9161746548 |
Hashes for neat_notation-0.4.13-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f3f348d8756513bc67c8d1f0af9b312ce11148bc7a1f1290d52af845f08b5a3 |
|
MD5 | 00012246b7eca5c027f4ec9b01631f54 |
|
BLAKE2b-256 | 6be801c95346e9c376d3243d9ba2bcb3d73899097db4e76d5679d2fd9670da73 |
Hashes for neat_notation-0.4.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd1eff2e62bc98b5bde93a79b28c776bccdd71302b3279d4cc676cac92772dcc |
|
MD5 | e74334b640d6cb5af27deb0ddea3bb0f |
|
BLAKE2b-256 | 895eea81c1bb453f6e10a920530e7a1541dd2261a7c8ab35f2a35ff7a0fdd7f1 |
Hashes for neat_notation-0.4.13-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9076f5065a11c6a01de2b2e5ce6c5f245328ba1b85d9970a09d5bb9903df657e |
|
MD5 | cb194d18e1b9b6d8df21ed5242de4258 |
|
BLAKE2b-256 | 2b3290bf37dbe8b4954ec0170a3819aa782f06942ee837a90cb4a6743bd6dcc0 |
Hashes for neat_notation-0.4.13-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4ebe2adb1643488ae10f447e3252d88549bce9c73e8671b947734219756b66e |
|
MD5 | d53095743a1450a45f0ef33f9efaf76f |
|
BLAKE2b-256 | d286d567b32d967c6c5a11758cc0fe471148a61b6f2570f7a1b87d68a33ecead |
Hashes for neat_notation-0.4.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83aa1af3bd641296eda79183985909f5619be7402fdb80ed7e21067c0fa97d70 |
|
MD5 | c0e17a8d0e537a92c616e53556ec20f8 |
|
BLAKE2b-256 | 6a257d52c71018f9b602dcc6c89982a9505b517a0fd52217261a74ae7eb0f05e |
Hashes for neat_notation-0.4.13-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e03b2f388d91f601d00ed3562b801f95b4fa68431861a38df8cc5c73373fb480 |
|
MD5 | 654e4ced0d0ab8bd30e870666b52d644 |
|
BLAKE2b-256 | 20a81026d9041cf8090fe4123860936deeb844a18f1603383c53e83d1893c5a4 |
Hashes for neat_notation-0.4.13-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ec04819be2ec273d992b8b30c6e05199692fa3f327610d6b0027c0c711688fd |
|
MD5 | cbfab37fd826d338dfaff7a96a656402 |
|
BLAKE2b-256 | a7315f7f3db3a0e279dbf85d139ae42ee23aaef4ee40652d972b939947abc8f1 |
Hashes for neat_notation-0.4.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb1181ca0df737baf34f14093f3d01a8b976d280ba64387f81c59c1b38a37e70 |
|
MD5 | 804883c2fd60f895195afab5405299ec |
|
BLAKE2b-256 | 9499d809fb4618be0485b7f3892b00acd3f958716fb07a61652957731e1f51da |
Hashes for neat_notation-0.4.13-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 911d7caa22c07b1bccc47f3155f6afdb580c020159c4bdd756ff2bea4e1306f0 |
|
MD5 | 9cd84ee4fff903b930a1048d2aff068e |
|
BLAKE2b-256 | ad744f2f760d46acad83d605f05f846f1b75bb130d1eb671e07fddf2435178d9 |
Hashes for neat_notation-0.4.13-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 138369cb5aea185389294e7fa3a6b9c9357b1b021296310ba30547331c88582d |
|
MD5 | 4def9b532120f0af5e6cc975f78de87d |
|
BLAKE2b-256 | 1f3aa5c03c91f833b6c08c0de249525b84a3f562a2c57b0baa6ea058d66082b7 |
Hashes for neat_notation-0.4.13-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbb736163f84dd97c7ddc1de0065dd32da71648fa2087036094c737c220b5e10 |
|
MD5 | 26f9e8c42c2de7e14443d1431ca33310 |
|
BLAKE2b-256 | b10bbfa6b3fcdbd0bcbffc4e22ba40a77ee17e8f2aa4d6a28bb5eb58d6ba85a3 |
Hashes for neat_notation-0.4.13-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b92ff8767667bd480c1bc381239d86ba829ac20480a66baeef1291e594bd3723 |
|
MD5 | 77194641d4d3d64e3d89c323de68e542 |
|
BLAKE2b-256 | fc7aad208a4b9a8e41819a64163b3c6f83bdf6b01b4acd68c0387ba682ed1e3a |