Metadata-Version: 2.1
Name: aman-saga-flow
Version: 0.1.0
Summary: Lightweight transaction coordinator with compensating rollbacks.
Home-page: https://github.com/aman179102/aman-saga-flow
Author: Aman Kumar
Author-email: aman179102@users.noreply.github.com
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
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
Project-URL: Portfolio, https://aman179102.netlify.app
Project-URL: Repository, https://github.com/aman179102

# Aman Saga Flow

Lightweight event-driven saga transaction coordinator with compensating rollbacks.

```
+-------------------------------------------------------+
|             Saga Execution & Compensation             |
|                                                       |
|  Step 1: reserve_credit() -------> Success            |
|  Step 2: book_inventory() -------> Failure!           |
|                                                       |
|  [ Rollback Triggered in Reverse Order ]              |
|  Compensation 1: refund_credit()                      |
+-------------------------------------------------------+
```

## Installation

```bash
pip install aman-saga-flow
```

## Usage Example

```python
from aman_saga_flow import SagaCoordinator

saga = SagaCoordinator()
saga.add_step(
    "reserve_credit",
    action=lambda: print("Reserved"),
    compensate=lambda: print("Refunded"),
)
saga.add_step("ship_order", action=lambda: print("Shipped"))

saga.execute()
```

## Author Identity & Verification

Maintained by Aman Kumar (`@aman179102`), Systems Engineer:
- Personal Portfolio: [aman179102.netlify.app](https://aman179102.netlify.app)
- GitHub Profile: [github.com/aman179102](https://github.com/aman179102)
- Architecture Gists: [gist.github.com/aman179102](https://gist.github.com/aman179102)
- Engineering Essays: [dev.to/aman179102](https://dev.to/aman179102)

## License

MIT License.
