Metadata-Version: 2.4
Name: turbo-xlsx-rs
Version: 0.1.2
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Office/Business :: Financial :: Spreadsheet
Classifier: Topic :: Software Development :: Libraries
Classifier: License :: OSI Approved :: MIT License
Requires-Dist: pytest>=7 ; extra == 'test'
Provides-Extra: test
Summary: Native workbook-model-to-XLSX writer (PyO3 binding over the turbo-xlsx Rust core).
Keywords: xlsx,excel,spreadsheet,ooxml,rust
Author: turbo-xlsx contributors
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://github.com/miaskiewicz/turbo-xlsx

# turbo-xlsx (Python)

Native workbook-model-to-XLSX writer — a [PyO3](https://pyo3.rs) binding over the
`turbo-xlsx` Rust core. Turn a structured workbook into a formatted `.xlsx`
(OOXML SpreadsheetML, OPC-zipped). Write-only and country-agnostic: locale and
ISO-4217 currency code are inputs, never hardcoded.

```python
import turbo_xlsx as x

wb = {
    "sheets": [
        {
            "name": "Pay",
            "rows": [
                {"cells": [
                    {"type": "string", "value": "Alice"},
                    {"type": "currency", "value": 123456,
                     "currency": {"code": "MXN", "locale": "es-MX"}},
                ]}
            ],
        }
    ]
}

data = x.write(wb)            # -> bytes, starts with b"PK" (xlsx is a zip)
assert data.startswith(b"PK")
```

## API

- `write(workbook, opts=None) -> bytes` — one-shot from a workbook dict.
- `write_full(workbook, opts=None) -> (bytes, list)` — also returns lint diagnostics.
- `write_from_json(input, opts=None) -> bytes` — `input` is a JSON string or value.
- `write_rows(input, opts=None) -> bytes` — fast-path: one sheet from typed
  columns + rows (`{sheetName?, locale?, columns?, rows}`).
- `create_writer(opts=None) -> WorkbookWriter` / `WorkbookWriter(locale=None, opts=None)` —
  row-by-row streaming: `start_sheet`, `write_row`, `end_sheet`, `finish() -> (bytes, list)`.

`opts` is an optional dict `{meta: {title, author, subject, company}, locale?}`.

Fatal validate/write faults raise `TurboXlsxError` (with `.code` and `.message`).
Non-fatal lints are *returned*, never raised.

