Skip to main content

A smart, modular and readable configuration file format for complex multifile solutions.

Project description

Neat Object Notation 0.6.15

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

neat_notation-0.6.15.tar.gz (15.8 kB view details)

Uploaded Source

Built Distributions

neat_notation-0.6.15-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

neat_notation-0.6.15-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

neat_notation-0.6.15-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

neat_notation-0.6.15-cp311-none-win_amd64.whl (209.2 kB view details)

Uploaded CPython 3.11 Windows x86-64

neat_notation-0.6.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

neat_notation-0.6.15-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (610.7 kB view details)

Uploaded CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

neat_notation-0.6.15-cp310-none-win_amd64.whl (209.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

neat_notation-0.6.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

neat_notation-0.6.15-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (610.7 kB view details)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

neat_notation-0.6.15-cp39-none-win_amd64.whl (209.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

neat_notation-0.6.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

neat_notation-0.6.15-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (610.7 kB view details)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

neat_notation-0.6.15-cp38-none-win_amd64.whl (209.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

neat_notation-0.6.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

neat_notation-0.6.15-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (611.1 kB view details)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

neat_notation-0.6.15-cp37-none-win_amd64.whl (209.1 kB view details)

Uploaded CPython 3.7 Windows x86-64

neat_notation-0.6.15-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

neat_notation-0.6.15-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (611.1 kB view details)

Uploaded CPython 3.7m macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

File details

Details for the file neat_notation-0.6.15.tar.gz.

File metadata

  • Download URL: neat_notation-0.6.15.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

Hashes for neat_notation-0.6.15.tar.gz
Algorithm Hash digest
SHA256 1ffb980f4373d2baa878458276c687709916f716d12ea42eb3566d6d73e9dd6d
MD5 6a98c2fd7f1e7dc4d22ff54e034ccaf0
BLAKE2b-256 7e6b3451cd938dab4183f53967e199ecdf244c8db5eae473eb0eb499082094ba

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.6.15-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for neat_notation-0.6.15-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d6c64dd4d8141d33bcfc88493d111e4a21a3a69e34f04ad56403c1e09aad2dfc
MD5 ac4d45e301993df2bd444179cfa9ee81
BLAKE2b-256 62857bbd4f63a244ebbd4f44ed25f6bffbeec4368b6c0f604730a98adbfef13e

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.6.15-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for neat_notation-0.6.15-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 202d27cfe4f0c1c45a96ceb238347090a1972062d23f307dcb00b93652bb4963
MD5 0f08f7d02ab17ad91f73f0053f1fe0bc
BLAKE2b-256 e74b55cc3838f4cb1e7d5e7892fde7ebda1f417ae169c35adb03579159122b20

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.6.15-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for neat_notation-0.6.15-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7053da6c9b52a96d03804a1227f56a9440a639e77687abffb03415ea7090098e
MD5 dd66bd9e2912f179964a6474d1ad1e11
BLAKE2b-256 242883f77db6c590b8703f36db475aafa2e1b2dcd7900794433d82d703f7b002

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.6.15-cp311-none-win_amd64.whl.

File metadata

File hashes

Hashes for neat_notation-0.6.15-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 8c44f8f4f89bdab962f12a627eaf8864275c9808112b45decec2cf6bab97ba9f
MD5 9be111f229ab2f63396764fa28a2ab1c
BLAKE2b-256 e12a7aaab60e7f11223f21b3fc114740cd607a97f14356fe58e7c9a6869bfd3a

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.6.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for neat_notation-0.6.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 59c188e5f6eeb37712bb1ae7d96631014940593faddfb0a775e7b679e9555834
MD5 c133b83a09fa0ec219d84cbb8c0048d7
BLAKE2b-256 59756898c99f4d91267b8991c838b52e68cbc70ff6933054f57cf50390d0779d

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.6.15-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for neat_notation-0.6.15-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 669f49e9023569fb093ac26723ed43a96e32eb789611daf3bdbffad1a402b5b7
MD5 af99d6d5394342f0eca2453f8bae18b2
BLAKE2b-256 4ea62043d581f2a7541ed78023ba493e6c04fa090544d6de88b78288d4b74b4d

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.6.15-cp310-none-win_amd64.whl.

File metadata

File hashes

Hashes for neat_notation-0.6.15-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 354439f6dba05866ec70e224a305be60e7f85fcee85393cca5615ca221a3c166
MD5 1c96420e902c6fdb6b53ab0885c70d77
BLAKE2b-256 bca65b1532833f2bf46e9086f5e13f5da7f70f998b6f47bff6d91448b473f593

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.6.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for neat_notation-0.6.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b483940dfa02a4c0dd7792cfeb353dfae0dcd8e80e8f58256ccc071973fb13e7
MD5 6d7f7478f560eafa9065011c98f3b7ab
BLAKE2b-256 23608b8402241c3cbb84fe815287dfc681352b1bb4554821a24bde3d603e7cf1

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.6.15-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for neat_notation-0.6.15-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a3df2e052292c93d07d6043b7fc9eee7a37367b1b566e6e023b596646a99c51d
MD5 895f7ac29efcf746688c9b113a927e41
BLAKE2b-256 8dcf6041da8fa25d456316f0522c175668d9d3dc6b841c86a3fa6660f3d2cd58

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.6.15-cp39-none-win_amd64.whl.

File metadata

File hashes

Hashes for neat_notation-0.6.15-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 cb1c7711fc9a336f391e40de772cf20eef1bbb98b7ca79718123839adb13b3ed
MD5 d6278ca3a3644387ca794a09bdf94607
BLAKE2b-256 7e42ec38aa32f0f384b09b34931b19b8220ec5c21217894b3baf9221b667448b

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.6.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for neat_notation-0.6.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2439a60f97e66175a6d50593b69f9a712faa24318b30628b30cbc3fd18bb607a
MD5 552a5f6c5f7a5e2e76496d1914525831
BLAKE2b-256 22fc7a89fdf527a816dccac49476d27bcf89315c5dfb59696bde970a86d18ab7

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.6.15-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for neat_notation-0.6.15-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 62c854b1cdb28984d2c9d7b31885bef3262c0292b7a259e589d5521c9e8a712b
MD5 171a027e8902168c7ba4e7ff1a33497c
BLAKE2b-256 62b84cc39f883b2fa717e75b7d1f4f21d4d7cfe254c1b1a896c38db39f9cbd11

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.6.15-cp38-none-win_amd64.whl.

File metadata

File hashes

Hashes for neat_notation-0.6.15-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 b1f85823f4d3a7deb899fb922a06422dcc6bb627209d326c2bcfda5dd7fbbaf6
MD5 07c718a7e58b58709d8f94e2c3791a8d
BLAKE2b-256 0d22e51b2a8791f0ea9d549b97928452a87e73eafe56ba6df12b9c8c0aedd188

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.6.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for neat_notation-0.6.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 620695b1571bc85aa748e57995a5290dfa231baddbed097737b6bb225581fde7
MD5 1610f24f259c6cf19ff3ddc9fd924002
BLAKE2b-256 eae4c99d727ff0d5f6486670dc67394b681bb89bc6e7746e092e1eb149884994

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.6.15-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for neat_notation-0.6.15-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ab9188cbecc24bf534887c5a1064987c7bd790a4ba5df06d6c7bdf06ec1a399f
MD5 259ada91a89ab8b7696288376ed52f53
BLAKE2b-256 1c6bf6ac3ba560504fcd0ec404aab253e74eb721fabb6f1768f7218784857f01

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.6.15-cp37-none-win_amd64.whl.

File metadata

File hashes

Hashes for neat_notation-0.6.15-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 c28821d92f5579708837e94f9a9cf768cc830ec8677077966107bdf1f7580c71
MD5 be023b14093ea7d5df8183fec002b70b
BLAKE2b-256 d66aaa0da85568ab028924767a29fb4b498830994622fb3cdfe5fdaff51d5327

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.6.15-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for neat_notation-0.6.15-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 550c1f2931c093c7a45314ec0a591404226e194c313038eba041ffe88f7d6012
MD5 249d908c060bcb0920e26a1b0fe1c589
BLAKE2b-256 011e6f4528e3036259c59e1a4f4d07357658a73624d868fde11678d1b1697ef3

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.6.15-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for neat_notation-0.6.15-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 82070add5756be6c1f3b0047304aa6e4dab95f063541e92daf0a5f9ca9ba6fd2
MD5 c88552e2ba8b47b8ec79d714eec6da25
BLAKE2b-256 d05032c111a6c4dab339208483c0f045e4801c609c3d8d1e17f42c51db4d994e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page