Metadata-Version: 2.4
Name: schlibs
Version: 0.1.0
Summary: Shared libraries for JSON-Path/JSON-Pointer conversion and pointer caching
Author-email: Your Name <your.email@example.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/yaccob/schlibs
Project-URL: Repository, https://github.com/yaccob/schlibs
Project-URL: Issues, https://github.com/yaccob/schlibs/issues
Keywords: json-path,json-pointer,jsonpath,conversion,cache
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: ruamel.yaml>=0.18.0
Requires-Dist: jsonpath-ng>=1.7.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: behave>=1.2.6; extra == "dev"
Requires-Dist: build>=1.0.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"

# 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

```python
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

```bash
pip install schlibs
```

## Development

This is a dual-language library project (Python + TypeScript) using behavior-driven development:

```bash
cd python/

# Install dev dependencies
pip install -e ".[dev]"

# Run BDD tests
behave

# Run unit tests
pytest
```

## License

MIT License - see [LICENSE](../LICENSE)
