Metadata-Version: 2.4
Name: payloaded
Version: 0.0.1
Summary: Transform flat tabular data into nested, hierarchical API payloads with grouping and reconciliation.
Project-URL: Homepage, https://github.com/svr-s/payloaded
Project-URL: Repository, https://github.com/svr-s/payloaded
Project-URL: Issues, https://github.com/svr-s/payloaded/issues
Author: svr-s
License: MIT
License-File: LICENSE
Keywords: api,batching,data-transformation,json,pandas,payload
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
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
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Requires-Dist: pandas>=1.5.0
Provides-Extra: dev
Requires-Dist: build>=1.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: twine>=4.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# payloaded

[![PyPI version](https://img.shields.io/pypi/v/payloaded.svg)](https://pypi.org/project/payloaded/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**`payloaded`** transforms flat tabular data (CSVs, DataFrames) into nested, hierarchical JSON payloads for REST/GraphQL APIs with grouping, batch chunking, and mathematical row reconciliation.

---

## Key Features

- **Template-Driven Payloads**: Map tabular columns directly to placeholders in complex, nested JSON skeletons.
- **Hierarchical Grouping**: Group rows by parent entities and automatically nest repeating child and grandchild elements.
- **Batch Chunking**: Split repeating entities across multiple payloads when batch limits are exceeded (e.g., max 50 line items per payload).
- **Audit & Zero-Loss Reconciliation**: Generates an auditable DataFrame containing payload indices, row tallies, source filenames, and Postman-ready payloads.

---

## Installation

```bash
pip install payloaded
```

---

## Quickstart

```python
import payloaded as pl

# Coming soon in v0.1.0!
```

---

## Output Structure

The output DataFrame provides complete transparency:

| Column | Description |
|---|---|
| `index` | Incremental payload identifier |
| `running_total` | Cumulative count of source rows packed (verifies zero data loss) |
| `payload` | Complete JSON payload ready to dispatch or paste into Postman |
| `source_filename` | Origin file name for multi-file traceability |

---

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
