Metadata-Version: 2.4
Name: jentic-apitools-storage
Version: 1.0.0a13
Summary: Jentic Apitools Storage - Plugin architecture for storing OpenAPI artifacts in different backends
Author: Jentic
Author-email: Jentic <hello@jentic.com>
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Requires-Dist: pydantic>=2.7,<3.0
Requires-Dist: jentic-apitools-common~=1.0.0a13
Requires-Dist: sqlalchemy
Requires-Dist: pygithub
Requires-Dist: pygithub>=2.0.0 ; extra == 'github'
Requires-Dist: boto3>=1.42.89 ; extra == 's3'
Requires-Python: >=3.11
Project-URL: Homepage, https://github.com/jentic/jentic-apitools
Provides-Extra: github
Provides-Extra: s3
Description-Content-Type: text/markdown

# Jentic API Tools - Storage

Pluggable storage backends for persisting OpenAPI pipeline artifacts to filesystem, S3, GitHub repositories, or SQL databases.

## Key Features

The storage package provides a `StorageBackend` abstract base class implemented by four backends: `FilesystemStorage` (default), `S3Storage`, `GitHubStorage`, and `DatabaseStorage`. A `StorageContext` context manager handles the lifecycle of temporary working directories during pipeline processing and persists results to the configured backend on exit. Helper functions create storage contexts from request metadata or environment variables, with fallback support. S3, GitHub, and database backends are imported on demand to avoid requiring their dependencies when unused.

## Dependencies

Internal: `jentic.apitools.common`. External: sqlalchemy, PyGithub. Optional: boto3 (for S3).

## Installation

```bash
pip install jentic-apitools-storage
```

## Quick Start

```python
from jentic.apitools.storage import StorageConfig, StorageType, StorageContext

config = StorageConfig(storage_type=StorageType.FILESYSTEM, base_path="./artifacts")
with StorageContext(config) as ctx:
    # Pipeline writes to ctx.working_dir
    pass
```

## Testing

```bash
pytest tests -v
```
