Metadata-Version: 2.4
Name: orchid-storage-postgres
Version: 1.0.1
Summary: PostgreSQL storage backend plugin for the Orchid AI framework
Project-URL: Homepage, https://github.com/gadz82/orchid-storage-postgres
Project-URL: Issues, https://github.com/gadz82/orchid-storage-postgres/issues
License: MIT
License-File: LICENSE
Keywords: agents,ai,asyncpg,postgresql,storage
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Requires-Dist: asyncpg>=0.29.0
Requires-Dist: langgraph-checkpoint-postgres>=2.0.0
Requires-Dist: orchid-ai>=1.8.2
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.25.0; extra == 'dev'
Requires-Dist: pytest-cov>=6.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.9.0; extra == 'dev'
Description-Content-Type: text/markdown

# orchid-storage-postgres

PostgreSQL storage backend plugin for the [Orchid AI](https://github.com/gadz82/orchid) framework.

## What it provides

- `OrchidPostgresChatStorage` — implements `OrchidChatStorage` backed by PostgreSQL (asyncpg)
- PostgreSQL visibility fragment for `build_run_filter_clause`
- PostgreSQL schema migration (v001)

## Installation

```bash
pip install orchid-storage-postgres
```

## Usage

Reference in your `orchid.yml`:

```yaml
storage:
  class: orchid_storage_postgres.chat_storage.OrchidPostgresChatStorage
  dsn: postgresql://user:pass@localhost:5432/orchid
```

Or build it programmatically:

```python
from orchid_storage_postgres import OrchidPostgresChatStorage

storage = OrchidPostgresChatStorage(dsn="postgresql://user:pass@localhost:5432/orchid")
await storage.init_db()
```

## Development

```bash
cd orchid-storage-postgres
pip install -e ".[dev]"
pytest tests/ -x
ruff check orchid_storage_postgres/
```

## License

MIT
