Nitro DataStore
Read JSON with dot notation and a chainable query builder. No schema to define, no ORM to learn.
$ pip install nitro-datastoreFeatures
Dot notation access
Access nested JSON data with simple dot notation instead of chained bracket lookups.
Dictionary and path strings
Three ways to access data: dot notation, dictionary style, or slash-separated paths.
Query builder
Filter and transform collections with a chainable, expressive query API.
Path discovery
Explore unknown data structures with glob patterns to find what you need.
Bulk operations
Update all matching values or clean up data across the entire store.
Immutable transforms
Transform all values or keys without mutating the original data.
Comparison and diffs
Compare datastores and generate structured diffs between versions.
Security built-in
Path traversal protection and file size limits prevent common attack vectors.
File operations
Load from files or directories, save to JSON with a single call.
Quick example
from nitro_datastore import NitroDataStore
# Load JSON with dot notation access
data = NitroDataStore.from_file("src/data/site.json")
# Simple dot notation
site_name = data.site.name
tagline = data.site.tagline
# Iterate collections (dicts are wrapped for dot access)
for post in data.posts:
print(post.title, post.slug)
# Query builder
featured = (data.query("posts")
.where(lambda p: p.get("featured"))
.sort(key=lambda p: p.get("date"), reverse=True)
.execute())Recipes
json.dumps in Python
Turn a dict into JSON text, and teach it about dates, decimals and sets.
Read ->JSONPath in Python
Pull values out of nested JSON, with or without a query language.
Read ->Parse JSON in Python
Turn JSON text into dicts and lists, and deal with text that is not JSON after all.
Read ->Pretty print JSON in Python
Indent it, sort it, and format a file without writing a script.
Read ->Working with JSON in Python
The four functions, the type table, and where each job is covered in detail.
Read ->Read a JSON file in Python
Open a JSON file, get a dict back, and handle the three ways it goes wrong.
Read ->Write JSON to a file in Python
Save a dict as JSON, change it later, and never leave a half-written file behind.
Read ->Get started with Nitro DataStore.
$ pip install nitro-datastore