Skip to main content

python-vpd

VirtualPathDictChains - Hierarchical Settings Management using YaML

This is an amalgamation of existing code that has been separated into its own package.

Hosted on GitHub: https://github.com/dbotwinick/python-vpd

As of version 0.9.5+, python 2.7 support is being phased out and targeting 3.9+ for python support. The legacy code is actually still python 2.7 compatible; however, the vpd.next code is not guaranteed to support python versions less than 3.9.

The base legacy code for VirtualPathDictChains is still useful and provides a mechanism to find data in "chains" of yaml. For example, if you had a dict: "{"test": {"v1": "v1", "v2":"v2"}}", using the VPD/VirtualPathDictChain approach, you could query for "test/v1" and get the result "v1". This was originally designed for complex settings or preferences management in python applications.

The "chain" part is that if a value is not found, the next source/VirtualPathDict would be searched. By having a chain, settings could be "merged" into a single queryable view. String values in the dicts also supported default arg substitution such that if a query result contained a text value of "{test/v2}", the bracketed expression would be used as a lookup to find that value--allowing references--which is also really useful for managing complex settings or preferences for an application etc.

The legacy code is maintained at vpd.legacy and backwards-compatible stubs are provided in the package root. Therefore, the following packages still work:

  • vpd.arguments
  • vpd.cid
  • vpd.cmp
  • vpd.iterable
  • vpd.yaml_dict

The newer generation code expands on this base concept to allow modeling arbitrary relationships among data "types" (expected to be yaml or yaml-like) to be able to create novel use-cases. So the next generation mechanism can also be used to model settings and use references to share settings/preferences. It's basically something like a simple, non-indexed, in-memory graph database for modeling relationships that do not require much complexity such that a real graph solution is warranted; however, the problem at hand benefits from describing relationships first and then lazily calculating some result following along the data relationships.

This newer code is in "vpd.next.graph".

As an additional utility basis, vpd.next.k8s provides utility mechanisms for Kubernetes. These are meant to ease tasks managing state (via ConfigMaps) and secrets for python applications. These can be combined with the legacy VirtualPathDict mechanisms as well as the vpd.next.graph mechanisms as part of maintaining complex applications intended to operate in a Kubernetes context. Note that the official Kubernetes python client is required for Kubernetes functionality.

More documentation to come...

Metadata

Release files for vpd 0.9.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vpd 0.9.13
File Size Uploaded
vpd-0.9.13.tar.gz 28.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vpd 0.9.13
File Interpreter ABI Platform
vpd-0.9.13-py3-none-any.whl Python 3 none any Details

Total release size: 61.6 kB

Release files / vpd-0.9.13.tar.gz

Download URL vpd-0.9.13.tar.gz
Size 28.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1bd6a81194d7cd4ebfeff5899c57d98447adcf27d4ec5597ac6ca240135f6151
BLAKE2b-256 checksum
How to use checksums
fecf415c76d473bc09f8dd707c9fe94338078e48f683caba1f1583f1b471c709
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / vpd-0.9.13-py3-none-any.whl

Download URL vpd-0.9.13-py3-none-any.whl
Size 33.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6b6f69f34104edc4692603474a6941317410d03aa6e3b999658cedc2856b517
BLAKE2b-256 checksum
How to use checksums
4995b9dbd4e62f2f49b415f63673a45c5bf16fd0c338490632e8f815646614bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release history Release notifications | RSS feed

This release

0.9.13 This release

2 release files

0.9.12

2 release files

0.9.11

2 release files

0.9.10

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page