Skip to main content

A navigable dictionary with dot notation access and automatic file loading

Project description

NavigableDict (aka. navdict)

A Python dictionary that supports both traditional key access (dict["key"]) and convenient dot notation (dict.key) for navigating nested data structures, plus some extras.

Features

  • Dot Notation Access: Access nested dictionaries with data.user.name instead of data["user"]["name"]
  • Backward Compatible: Works exactly like a regular dictionary for all standard operations
  • Nested Structure Support: Automatically converts nested dictionaries to navdict objects
  • Safe Attribute Access: Handles keys that conflict with dictionary methods gracefully
  • Type Hints: Full typing support for better IDE integration
  • Lightweight: Minimal overhead over standard dictionaries

and

  • Automatic File Loading: Seamlessly load and parse data files (CSV, YAML, JSON, etc.) when accessing dictionary keys, eliminating manual file handling
  • Dynamic Class Instantiation: Automatically import and instantiate classes with configurable parameters, enabling flexible object creation from configuration data

Installation

From PyPI (Recommended)

pip install navdict

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

navdict-0.2.1.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

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

navdict-0.2.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

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