schlibs - Shared Libraries
A BDD-driven library providing utilities for JSON-Path/JSON-Pointer conversion and pointer caching.
Features
json_pathlib
Bidirectional conversion between JSON-Path and JSON-Pointer formats:
- JSON-Pointer → JSON-Path: Straightforward conversion
- JSON-Path → JSON-Pointer: Resolves expressions against actual documents
- Supports wildcards and filter expressions that may produce multiple results
from json_pathlib import pointer_to_path, path_to_pointer, path_to_pointers
# Simple conversion
path = pointer_to_path("/store/book/0/title")
# Result: "$.store.book[0].title"
# Resolve JSON-Path against a document
doc = {"store": {"book": [{"title": "Book 1"}, {"title": "Book 2"}]}}
pointer = path_to_pointer("$.store.book[0].title", doc)
# Result: "/store/book/0/title"
# Multiple results with wildcards
pointers = path_to_pointers("$.store.book[*].title", doc)
# Result: ["/store/book/0/title", "/store/book/1/title"]
pointercache
Caching system with configurable eviction policies (coming soon).
Installation
pip install schlibs
Development
This is a dual-language library project (Python + TypeScript) using behavior-driven development:
cd python/
# Install dev dependencies
pip install -e ".[dev]"
# Run BDD tests
behave
# Run unit tests
pytest
License
MIT License - see LICENSE
Release files for schlibs 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| schlibs-0.1.1.tar.gz | 10.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| schlibs-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.7 kB
Release files / schlibs-0.1.1.tar.gz
| Download URL | schlibs-0.1.1.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9e3e2b174107dd271677f02dd67d9873c218602ad3d9202a90269416b1ebfc1
|
|
BLAKE2b-256 checksum How to use checksums |
60cd91abfab6111ff8e309683408eeecb74465017d9a4631a372f75c047bc5a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|
Release files / schlibs-0.1.1-py3-none-any.whl
| Download URL | schlibs-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ee55d54a66c82a7324d83b01aa408930ef62af2d503d8bca6b6e15cf213f88e
|
|
BLAKE2b-256 checksum How to use checksums |
7662c195a9aac6ac0137c3e6fbc32b3c17c1cf83e7545f5a67fd2db9d28df7f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|