Metadata-Version: 2.1
Name: wexample-storage
Version: 1.2.6
Author-Email: weeger <contact@wexample.com>
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Requires-Dist: wexample-config
Requires-Dist: wexample-helpers>=20.6.0
Requires-Dist: wexample-remote>=1.1.6
Provides-Extra: neo4j
Requires-Dist: neo4j>=5; extra == "neo4j"
Provides-Extra: postgres
Requires-Dist: psycopg2-binary; extra == "postgres"
Requires-Dist: sqlalchemy>=2; extra == "postgres"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: wexample-wallet; extra == "dev"
Description-Content-Type: text/markdown

# storage

Version: 1.2.6

## Table of Contents

- [Introduction](#introduction)
- [Install](#install)
- [Tests](#tests)
- [Roadmap](#roadmap)
- [Status Compatibility](#status-compatibility)
- [Useful Links](#useful-links)

`wexample-storage` gives an application the places it keeps contents in, behind one interface per kind of content: files written and read back by key, vectors searched by similarity, graphs queried in their own language. Each storage has a name and the capabilities it accepts (`files`, `vectors`, `graph`), and a registry picks the storage for a capability — so the code needing a place to write never chooses the backend itself.

Every storage is a `wexample-remote` remote, so it can be checked like any other service. Backends: a local directory, PostgreSQL with pgvector (the `postgres` extra), Neo4j (the `neo4j` extra).

## Installation

```bash
pip install wexample-storage
```

Requires Python >=3.10.

## Tests

This project uses `pytest` for testing and `pytest-cov` for code coverage analysis.

### Installation

First, install the required testing dependencies:
```bash
.venv/bin/python -m pip install pytest pytest-cov
```

### Basic Usage

Run all tests with coverage:
```bash
.venv/bin/python -m pytest --cov --cov-report=html
```

### Common Commands
```bash
# Run tests with coverage for a specific module
.venv/bin/python -m pytest --cov=your_module

# Show which lines are not covered
.venv/bin/python -m pytest --cov=your_module --cov-report=term-missing

# Generate an HTML coverage report
.venv/bin/python -m pytest --cov=your_module --cov-report=html

# Combine terminal and HTML reports
.venv/bin/python -m pytest --cov=your_module --cov-report=term-missing --cov-report=html

# Run specific test file with coverage
.venv/bin/python -m pytest tests/test_file.py --cov=your_module --cov-report=term-missing
```

### Viewing HTML Reports

After generating an HTML report, open `htmlcov/index.html` in your browser to view detailed line-by-line coverage information.

### Coverage Threshold

To enforce a minimum coverage percentage:
```bash
.venv/bin/python -m pytest --cov=your_module --cov-fail-under=80
```

This will cause the test suite to fail if coverage drops below 80%.

## Known Limitations & Roadmap

Current limitations and planned features are tracked in the GitHub issues.

See the [project roadmap](https://github.com/wexample/python-storage/issues) for upcoming features and improvements.

## Status & Compatibility

**Maturity**: Production-ready

**Python Support**: >=3.10

**OS Support**: Linux, macOS, Windows

**Status**: Actively maintained

## Useful Links

- **Homepage**: https://github.com/wexample/python-storage
- **Issue Tracker**: https://github.com/wexample/python-storage/issues
- **Discussions**: https://github.com/wexample/python-storage/discussions
- **PyPI**: [pypi.org/project/wexample-storage](https://pypi.org/project/wexample-storage/)
