Metadata-Version: 2.4
Name: pcmi
Version: 1.51.0
Summary: PCMI Python SDK — async HTTP client for the Persistent Cognitive Memory Infrastructure API
Project-URL: Homepage, https://github.com/marco-spagn/pcmi
Project-URL: Repository, https://github.com/marco-spagn/pcmi
Project-URL: Documentation, https://github.com/marco-spagn/pcmi/tree/main/sdk/python
Author: Marco Spagnuolo
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2
Description-Content-Type: text/markdown

# PCMI Python SDK

Async **HTTP** client for [PCMI](https://github.com/marco-spagn/pcmi). For high-throughput store/retrieve, use gRPC or REST directly.

## Requirements

- Python 3.10+

## Install

The `pcmi` package is published to PyPI on each GitHub Release. Until the first publish:

```bash
pip install -e .                                    # from this directory
pip install "git+https://github.com/marco-spagn/pcmi.git#subdirectory=sdk/python"
```

After publish:

```bash
pip install pcmi
```

## Quick start

```bash
export PCMI_BASE_URL=http://localhost:8000 PCMI_API_KEY=testkey123
python smoke.py
```

```python
import asyncio
from pcmi import PCMIClient

async def main() -> None:
    async with PCMIClient("http://localhost:8000", "your-api-key") as client:
        await client.store("user.note", "hello", tags=["demo"])
        result = await client.retrieve("user.note", tags=["demo"])
        print(result)

asyncio.run(main())
```

## Documentation

- [SDK overview](../README.md)
- [HTTP API](../HTTP-API.md)
