Metadata-Version: 2.4
Name: alt-python-pynosqlc-dynamodb
Version: 1.0.4
Summary: DynamoDB driver for pynosqlc
Project-URL: Homepage, https://github.com/alt-python/pynosqlc
Project-URL: Repository, https://github.com/alt-python/pynosqlc
Project-URL: Documentation, https://github.com/alt-python/pynosqlc#getting-started
Project-URL: Bug Tracker, https://github.com/alt-python/pynosqlc/issues
Author: Craig Parravicini, Claude (Anthropic)
License: MIT
Keywords: async,aws,database,driver,dynamodb,nosql
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Requires-Dist: aioboto3>=2.7
Requires-Dist: alt-python-pynosqlc-core
Description-Content-Type: text/markdown

# pynosqlc-dynamodb

DynamoDB driver for [pynosqlc](https://github.com/alt-python/pynosqlc) — connects to Amazon DynamoDB (or DynamoDB Local) via aioboto3.

## Install

```
pip install alt-python-pynosqlc-dynamodb
```

## Requirements

- Python 3.12+
- aioboto3 2.7+
- AWS credentials configured (`~/.aws/credentials`, environment variables, or IAM role)
- For local development: [DynamoDB Local](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html)

## Usage

### AWS (production)

```python
import asyncio
from pynosqlc.core import DriverManager, Filter
import pynosqlc.dynamodb  # auto-registers DynamoDriver

async def main():
    async with await DriverManager.get_client('pynosqlc:dynamodb:us-east-1') as client:
        col = client.get_collection('orders')
        await col.store('o1', {'item': 'widget', 'qty': 5})
        f = Filter.where('qty').gt(0).build()
        async for doc in await col.find(f):
            print(doc)

asyncio.run(main())
```

### DynamoDB Local

Pass `endpoint` in the properties dict to point at a local instance:

```python
async with await DriverManager.get_client(
    'pynosqlc:dynamodb:us-east-1',
    properties={'endpoint': 'http://localhost:8000'},
) as client:
    ...
```

## URL scheme

```
pynosqlc:dynamodb:<aws-region>
```

Example: `pynosqlc:dynamodb:us-east-1`

Optional properties:

| Key | Description |
|---|---|
| `endpoint` | Override endpoint URL (e.g. `http://localhost:8000` for DynamoDB Local) |
| `aws_access_key_id` | AWS access key (falls back to environment / credential chain) |
| `aws_secret_access_key` | AWS secret key (falls back to environment / credential chain) |
