Skip to main content

NDCA (Nested Data Collection API) — a fast, safe, and human-readable nested data storage and manipulation library for Python.

Project description

NDCA 1.0.0 — Nested Data Collection API

NDCA (Nested Data Collection API) is a high-performance, secure, and production-ready Python library for managing deeply nested structured data using a compact, human-readable format. It is designed for reliability, atomic persistence, safe in-memory operations, and a clean, intuitive API suitable for scripts, services, and small-to-medium projects.

Key Features:

  • Human-readable format: Store and read nested dictionaries and lists in a clear, concise structure.
  • Safe operations: All reads and writes use deep-copy semantics to prevent accidental mutation.
  • Atomic file writes: Data is safely persisted to disk, ensuring integrity even during crashes or interruptions.
  • Optional autosave: Automatically save changes to the assigned file (file("x.ndca", autosave=True)).
  • Flexible path-based access: Get, write, and delete nested values using dot notation for dictionaries (a.b.c) and bracket notation for lists (arr[0], arr[]).
  • Merge and append: Merge dictionaries (merge) or append items to lists (append) effortlessly.
  • Pop and update: Remove or retrieve values (pop(path, default)) and update values with a callback (update(path, fn, default)).
  • Numeric and boolean utilities: Increment numbers (incr(path, step)) and toggle booleans (toggle(path)).
  • Key management: Rename keys or paths (rename(old_path, new_path)) and clear any path safely (clear_path(path)).
  • Full serialization support: Convert to and from NDCA text format (dumps(data) / loads(text)).
  • Version: 1.0.0 — stable, fully-featured, and production-ready.

Usage Example:

from ndca import NDCA, file, get, write, delete, wipe, save, dump, merge, append, pop, update, incr, toggle, rename, clear_path, loads, dumps

db = NDCA("data.ndca", autosave=True)
db.write("user.name", "Viren")
db.append("user.scores", 10)
db.incr("user.level")
db.toggle("user.active")
db.rename("user.name", "user.username")
text = db.dumps()
new_data = loads(text)

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

ndca-1.0.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ndca-1.0.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file ndca-1.0.0.tar.gz.

File metadata

  • Download URL: ndca-1.0.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for ndca-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bfa2cffc38fa9111d2d404df0f8a49e7e57e0e473016ead7a5596b0d528551b2
MD5 2287c7a8893d99ce361210ab18a6a823
BLAKE2b-256 a856c96d3e929411e0208788599a73cb18cf200ae61036265abf2d91eb338fef

See more details on using hashes here.

File details

Details for the file ndca-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ndca-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for ndca-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aad63a9be60c75c65b7c0f856a4ef594314391246ce3c61bbf05f3de540243f2
MD5 faaad688ab2b89bb3be1fa383ebe51f9
BLAKE2b-256 df3869cbfd3b66a3ddc2fe2df323e89ce049ed6a9db53aa53f0d4ad8d31466ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page