Metadata-Version: 2.5
Name: onestep-mysql
Version: 0.6.0
Summary: MySQL connector plugin for onestep.
License: MIT
Requires-Python: >=3.9
Requires-Dist: aiosqlite>=0.20.0
Requires-Dist: asyncmy>=0.2.10
Requires-Dist: mysql-replication>=1.0.15
Requires-Dist: onestep>=1.7.3
Requires-Dist: sqlalchemy[asyncio]>=2.0.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'test'
Requires-Dist: pytest>=8.0.0; extra == 'test'
Description-Content-Type: text/markdown

# onestep-mysql

MySQL connector plugin for `onestep`.

```bash
pip install onestep-mysql
```

The package registers these YAML resource types through the `onestep.resources`
entry point:

- `mysql`
- `mysql_state_store`
- `mysql_cursor_store`
- `mysql_table_queue`
- `mysql_incremental`
- `mysql_binlog`
- `mysql_table_sink`

Python usage:

```python
from onestep_mysql import MySQLConnector
```

SQLAlchemy database operations use `AsyncEngine` and async drivers. Existing
`mysql://` and `mysql+pymysql://` DSNs are accepted and are automatically
adapted to the `asyncmy` dialect. SQLite is supported in tests and local
development through `aiosqlite`. The binlog reader remains isolated behind a
thread boundary because `mysql-replication` is a synchronous library.

Production `mysql_incremental` sources should bind a durable
`mysql_cursor_store` with an explicit stable `state_key`. Retries redeliver the
same logical row with incremented attempts and pause later SQL reads across the
gap. Concurrent acknowledgements advance only a contiguous prefix and are
coalesced into cursor-store commit waves.
