human readable and writable data interchange format
NestedText is a file format for holding structured data to be entered, edited, or viewed by people. It organizes the data into a nested collection of dictionaries, lists, and strings without the need for quoting or escaping. A unique feature of this file format is that it only supports one scalar type: strings. While the decision to eschew integer, real, date, etc. types may seem counter intuitive, it leads to simpler data files and applications that are more robust.
NestedText is convenient for configuration files, address books, account information, and the like. Because there is no need for quoting or escaping, it is particularly nice for holding code fragments. Here is an example of a file that contains a few addresses:
# Contact information for our officers Katheryn McDaniel: position: <s>president</s> address: > <s>138 Almond Street</s> > <s>Topeka, Kansas 20697</s> phone: cell: <s>1-210-555-5297</s> home: <s>1-210-555-8470</s> # Katheryn prefers that we always call her on her cell phone. email: <s>KateMcD@aol.com</s> additional roles: - <s>board member</s> Margaret Hodge: position: <s>vice president</s> address: > <s>2586 Marigold Lane</s> > <s>Topeka, Kansas 20682</s> phone: <s>1-470-555-0398</s> email: <s>email@example.com</s> additional roles: - <s>new membership task force</s> - <s>accounting task force</s>
This package contains a Python reference implementation of NestedText and a test suite. Implementation in many languages is required for NestedText to catch on widely. If you like the format, please consider contributing additional implementations.
Also, please consider using NestedText for any applications you create. It is especially suitable for configuration files.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for nestedtext-3.3.0-py3-none-any.whl