Skip to main content

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

Project description

Neat Object Notation 0.5.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}}

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.5.15.tar.gz (15.4 kB view details)

Uploaded Source

Built Distributions

neat_notation-0.5.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.5.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.5.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.5.15-cp311-none-win_amd64.whl (208.9 kB view details)

Uploaded CPython 3.11 Windows x86-64

neat_notation-0.5.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.5.15-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (610.4 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.5.15-cp310-none-win_amd64.whl (208.9 kB view details)

Uploaded CPython 3.10 Windows x86-64

neat_notation-0.5.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.5.15-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (610.4 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.5.15-cp39-none-win_amd64.whl (208.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

neat_notation-0.5.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.5.15-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (610.4 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.5.15-cp38-none-win_amd64.whl (208.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

neat_notation-0.5.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.5.15-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (610.9 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.5.15-cp37-none-win_amd64.whl (208.8 kB view details)

Uploaded CPython 3.7 Windows x86-64

neat_notation-0.5.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.5.15-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (610.9 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.5.15.tar.gz.

File metadata

  • Download URL: neat_notation-0.5.15.tar.gz
  • Upload date:
  • Size: 15.4 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.5.15.tar.gz
Algorithm Hash digest
SHA256 a99ca75215fc8177770f311131dcfc06d30486aee9b23faf11a3b7bdeeb08d8f
MD5 ab8dfea4d0c24bc1ca730d217f281a9d
BLAKE2b-256 6cce5e7ac2e5ea3f0e5d799648e2cc05038467a280117bfbcca3681f77bcd822

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for neat_notation-0.5.15-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e857793b006d6ae40e9ddab5a66b27d93cd3c3711a4280a2dce410884a9952b3
MD5 a32ff9bca319668db73111d9b31fe429
BLAKE2b-256 598b0bc986387c110e65ab8206d59132e9bb103c945fb228ea0861c4789dd300

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for neat_notation-0.5.15-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2199658563c608e693c429db9b143ae28e5c8c9ba267b694e032c0754d49b652
MD5 1907d36b95b288e4700d8a03df90c9f8
BLAKE2b-256 42f3697123a2cf7060533d8749b18f66bf3709f20b68c9a86420633e683853d1

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for neat_notation-0.5.15-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a03db4ff3c70c077a59c866f0eb570c93a4294829a06ad29e61284ecc1d6cc14
MD5 0f3562442caa2f5b6d7e47bd2abd46ef
BLAKE2b-256 a8bb7bca5e5393c3337a59f2fc0f3af5872e88887a4a3e5da37604cb0cdf39b7

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for neat_notation-0.5.15-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 a6e6e193186f2c5bc56bc67f70706bed5d2304afef4984d370157b95d7e8844c
MD5 31d588d65269343057eec8d601710188
BLAKE2b-256 53d6d9c9b63f8eb7cabec2feb76321ac78f07f7ac103665262229ab6fea7d761

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for neat_notation-0.5.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ad01a435d925d3bcf7d8980e94ccf5e0336693d4dcad6ed942ec93cb4deed30a
MD5 ab90bbc6f4470932218d7df8d595bf6b
BLAKE2b-256 46e8801a56f811faf09f145c350c8047f7447923aca1d43b783856c0c74df578

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.5.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.5.15-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 90d22f6bdf8b76223aa8726c24d6cfbb94c707b42ffa48ca487f58440bbfca2d
MD5 3526b5b4b272eb5e6c05cc4509d8d8e1
BLAKE2b-256 2721fa9ceb73f3b9330328d147b4e3039c743c2a357bcc160dc6ba73f997696d

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for neat_notation-0.5.15-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 8f5d7d330f0e8b524ee14d54f27ad847ab65719a5323925970b802468fae3e81
MD5 c554080005d47d6e512a8a456b195c04
BLAKE2b-256 1da2afaa71df2c638f5df3c8110224af2c1b6ac28faa901c1bf10b4cc40ee18c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for neat_notation-0.5.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cd494eda8367dbdb4978eb82fa6519bfa2515d15bd869191598a28d2cbf75b47
MD5 80a6fe92f5050adac30c55760adde363
BLAKE2b-256 c90015dd60823bfd8f0bb9f7c4cefe21c148762cfd316b251ecbc4109d3c8311

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.5.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.5.15-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6bbe92c23033c93a38f48ac97b3c9263c77c299df42ff7db775757055a6704fe
MD5 99dd217d6582813290b9eeb58154ec54
BLAKE2b-256 d0d9d94ec4fab05c49ede42ec1a63ee6af44b425432a269dde44f753522dccc3

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for neat_notation-0.5.15-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 9f8d48c52092acaab55e21e40a9d0f2ed5e243813f2af44c0e010baecd6643a5
MD5 b2369b0b9db3258518273ad4e3a52af0
BLAKE2b-256 b8985a1b24b7cf9c4e9ed8d79432911fc02f5ae3c71dfe523d997fe30144f555

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for neat_notation-0.5.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 46de04f581814eda00b674187d467f973553b14b8861d58fe55bb03e4a0936ea
MD5 0557b4d56b7727e2bbc4adeeae66f867
BLAKE2b-256 876b42db058d87f0d9464a5a2dd7caf98276067f2cf3b5a53988fe85e3227189

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.5.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.5.15-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3132ecc7f9d44061dfb774e342a9353187223359d612a9eb808685bbf7bbe44d
MD5 37f5ba86988870742aa69ae5a73cc6a6
BLAKE2b-256 444d9bf1de90a8f29748b8c041ccd9266e8cf9adb475489f8606ad7268dcfe27

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for neat_notation-0.5.15-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 86b7f06fa647c13c227e16d6ac4445ae8c0f89ed5c1f9ae8d2c1f1e8b070e098
MD5 9a643eeefad7fd4fdd6cdd598d67d6ba
BLAKE2b-256 691a1b3daf7bdba7e90aa2a4b4ce5f7a6caab7303d48801aedf282118555e447

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for neat_notation-0.5.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4d2f4713f0de7de580f2b19055a4f17f4c55bbb12ae092494292476fd62df882
MD5 20b6d45196fda2526c2d6828494c96b5
BLAKE2b-256 badd2b750ab7165346b37480721a1c38febd51380d5210b7b296273900c85d6f

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.5.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.5.15-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5e1d9032aa9c9be25dcc66127437e38d21f6ad5b384c7e76e1fabb6d91b24289
MD5 9238b5c8970fd6cda324f411f9f05c2c
BLAKE2b-256 6e2759014aec22ca9c6e28c4a331bccd12818914608888d8f1e2585b4557bd81

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for neat_notation-0.5.15-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 322f2d3ca04276b6441059184fb50597e9c940c7eb6292b1e5b7e8386f63930e
MD5 5902d7c1537fddeda9a0c1f23223d17c
BLAKE2b-256 056d1f2d6dfc8b6430c22a405273339ddb3925e5b0c30dda5fc0dba27368cd97

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for neat_notation-0.5.15-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c805e9e5c5f71acbba35939f72ad26d0e5bebfe7546115a2247a4fd351546600
MD5 bba1f19843d5fd9a91281f9b85c3dc13
BLAKE2b-256 2604cb3b8168bd947d42a9bba338e959ec2edcade316c87ffe35b59a8a5456c9

See more details on using hashes here.

Provenance

File details

Details for the file neat_notation-0.5.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.5.15-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3b493df874f3103d12c16e71f826901cbe17de7b154a97d37f6c3e7c542ff04f
MD5 9497f64c3e1d149df7e601ea50dedc79
BLAKE2b-256 14acec0bdcde78c494a27a4b7384a53aaa2a147f067366fc90a70719148a8ce9

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