nestedtext
human readable and writable data interchange format
What it is and what it does
NestedText is a file format designed to make structured data easy for humans to read, edit, and write directly. Unlike JSON or YAML, it uses only strings as values—no integers, booleans, or floats—which eliminates the need for quoting and escaping. This simplicity makes the format robust against syntax errors and allows raw text (including code snippets) to be embedded without confusion.
The package provides a Python implementation with functions to parse NestedText files into Python dictionaries and lists, and to serialize them back to the format. It's intended for configuration files, data journals, address books, and similar applications where human readability matters. The format also works well for structured code use cases—like test specifications or workflow definitions—where embedding unquoted code snippets is valuable.
Use it for:
- Write and parse configuration files that are cleaner and more hierarchical than INI or TOML formats.
- Store test case specifications (commands, expected outputs, regexes) without quoting or escaping code snippets.
- Create human-editable data files (address books, contact lists, account information) that don't require special syntax knowledge.
- Build command-line tools that output data readable by both humans and other programs without a separate JSON flag.
- Define structured code or domain-specific languages where code snippets must be embedded without escaping conflicts.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
NestedText is a human-friendly file format for structured data that uses only strings, requiring no quoting or escaping, and provides a Python parser and serializer for reading and writing such files.
Yes. NestedText is actively maintained, has no known vulnerabilities, and installs with minimal friction. It's worth installing if you need a human-friendly alternative to JSON or YAML for configuration, test data, or structured text that avoids quoting and escaping overhead. The permissive MIT license poses no barrier.
Install
nestedtext on PyPI
pip
pip install nestedtextuv
uv add nestedtextpoetry
poetry add nestedtextInstalling nestedtext
Before you install
Low friction: pure Python wheel with a single dependency (inform). Active maintenance with recent commits and no known vulnerabilities.
License in practice
MIT license (permissive) — you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install nestedtext
import nestedtext
data = nestedtext.loads(open('config.nt').read())
print(data['name'])
Verify before relying
- Whether the package handles round-trip serialization (load then dump) without data loss or formatting changes.
- Performance characteristics when working with large files or deeply nested structures.
- Whether inform dependency adds any runtime overhead or external system requirements.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — inform |
| Maintenance | actively maintained — 231 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 76,513/month — #14,620 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: nestedtext-3.8-py3-none-any.whl
Keywords: data, serialization, json, yaml
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
risonEncodes and decodes data to and from Rison, a…
permissive · top 15,000 on PyPI
prisonEncodes and decodes a compact URI-friendly data…
permissive · top 5,000 on PyPI
MarkupSafeMarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
humanfriendlyFormats and parses numbers, file sizes,…
permissive · top 1,000 on PyPI
paradictParadict serializes and deserializes Python…
permissive · top 15,000 on PyPI
agateagate is a Python data analysis library…
permissive · top 1,000 on PyPI
conlluParses CoNLL-U formatted text (a standard NLP…
unclear · top 15,000 on PyPI
FormEncodeFormEncode validates and generates HTML forms,…
permissive · top 15,000 on PyPI
drf-writable-nestedExtends Django REST Framework serializers to…
permissive · top 15,000 on PyPI
ctparseParses natural language time expressions (like…
permissive · top 15,000 on PyPI