nitro-datastore

Use when working with JSON data in Python - nested dictionary access, querying collections, bulk transformations, or file-based config management

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "nitro-datastore" with this command: npx skills add nitrosh/nitro-datastore/nitrosh-nitro-datastore-nitro-datastore

Nitro DataStore

Schema-agnostic JSON data store for Python with multiple access patterns.

Installation

pip install nitro-datastore

Quick Reference

Access PatternSyntaxBest For
Dot notationdata.site.nameStatic keys
Dictionarydata['site']['name']Kebab-case keys, dynamic access
Path-baseddata.get('site.name', default)Dynamic paths, defaults

Core Patterns

Creating and Loading

from nitro_datastore import NitroDataStore

# From dict
data = NitroDataStore({'site': {'name': 'Nitro'}})

# From file
data = NitroDataStore.from_file('config.json')

# From directory (auto-merges alphabetically)
data = NitroDataStore.from_directory('data/')

Reading Values

# Dot notation (returns NitroDataStore for nested dicts)
data.site.name

# Path with default
data.get('site.theme.colors.primary', '#000')

# Multiple values
data.get_many(['site.name', 'site.url'])

Writing Values

# Dot notation
data.site.name = 'New Name'

# Path-based (creates intermediate dicts)
data.set('config.cache.ttl', 3600)

# Merge another datastore
data.merge(other_data)

Query Builder

results = (data.query('posts')
    .where(lambda p: p.get('published'))
    .sort(key=lambda p: p.get('views'), reverse=True)
    .limit(10)
    .execute())

# Utilities
count = data.query('posts').where(...).count()
first = data.query('posts').first()
titles = data.query('posts').pluck('title')
by_category = data.query('posts').group_by('category')

Bulk Operations

# Update matching values
count = data.update_where(
    condition=lambda path, value: 'http://' in str(value),
    transform=lambda value: value.replace('http://', 'https://')
)

# Clean up
data.remove_nulls()
data.remove_empty()

Path Discovery

# List all paths
paths = data.list_paths()
paths = data.list_paths(prefix='site')

# Glob patterns
titles = data.find_paths('posts.*.title')
urls = data.find_paths('**.url')

# Find by key name
all_urls = data.find_all_keys('url')

# Find by value predicate
emails = data.find_values(lambda v: isinstance(v, str) and '@' in v)

Transformations

# Transform all values (returns new instance)
upper = data.transform_all(
    lambda path, value: value.upper() if isinstance(value, str) else value
)

# Transform keys
snake_case = data.transform_keys(lambda k: k.replace('-', '_'))

File Output

data.save('output.json', indent=2)
plain_dict = data.to_dict()

Common Gotchas

IssueProblemSolution
Kebab-case keysdata.user-name invalid PythonUse data['user-name']
Dots in keysdata.get('key.with.dots') looks for nestedUse data['key.with.dots']
Transform mutabilitydata.transform_keys(...) doesn't mutateAssign result: data = data.transform_keys(...)
Nested access returnsdata.site returns NitroDataStoreUse .to_dict() for plain dict

Security Features

# Path traversal protection
data = NitroDataStore.from_file(path, base_dir='/safe/dir')

# File size limits
data = NitroDataStore.from_file(path, max_size=10*1024*1024)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

nitro-cli

No summary provided by upstream source.

Repository SourceNeeds Review
General

nitro-ui

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated