Skip to main content

Native workbook-model-to-XLSX writer (PyO3 binding over the turbo-xlsx Rust core).

Project description

turbo-xlsx (Python)

Native workbook-model-to-XLSX writer — a PyO3 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.

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) -> bytesinput 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

turbo_xlsx_rs-0.1.2.tar.gz (75.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

turbo_xlsx_rs-0.1.2-cp38-abi3-win_amd64.whl (530.1 kB view details)

Uploaded CPython 3.8+Windows x86-64

turbo_xlsx_rs-0.1.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (654.3 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

turbo_xlsx_rs-0.1.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (628.8 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

turbo_xlsx_rs-0.1.2-cp38-abi3-macosx_11_0_arm64.whl (589.3 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

Details for the file turbo_xlsx_rs-0.1.2.tar.gz.

File metadata

  • Download URL: turbo_xlsx_rs-0.1.2.tar.gz
  • Upload date:
  • Size: 75.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for turbo_xlsx_rs-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d80e527e6b58cfdb33c2786c7b4513ab59a5a2ab25353c5cf1ef7d3659ca1be5
MD5 0893a7ef32164b071ca19c29ce75186e
BLAKE2b-256 b8cd080d83221cd211193e494c7eed3d8cea75fe78c3a4d443dac014ba4a6984

See more details on using hashes here.

File details

Details for the file turbo_xlsx_rs-0.1.2-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for turbo_xlsx_rs-0.1.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9c18d8c85073e4f0968552dd8cda6ddbd64f71882fbe04ce0e79761b65c0c39a
MD5 9ca55321c5176a730609dc18e7f23a1f
BLAKE2b-256 bc0a4496c1f6d971b6572ea9ba067eb091ca2736555a2a74889b65acff510459

See more details on using hashes here.

File details

Details for the file turbo_xlsx_rs-0.1.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for turbo_xlsx_rs-0.1.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1459e80a71ca04565ca09d5f4328a5c7a61ce10b356e3009fde9ff6c215ddd8c
MD5 6a806d3ee196aabeab1c713c1ac62794
BLAKE2b-256 ab26dcd401831f5e1a31e3213af517665b3d6e3d838e1a646d41eb7178d1c69a

See more details on using hashes here.

File details

Details for the file turbo_xlsx_rs-0.1.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for turbo_xlsx_rs-0.1.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ea75832e2a1387c4d8a00bc39db28bb493d79511804ff02a7eb9ed40507d5bb9
MD5 00fc555158576861841f6a065fad74a8
BLAKE2b-256 5c5e504de7ab09fe19556d2697686324090cdb3c498dbc6d04d01298c92aad79

See more details on using hashes here.

File details

Details for the file turbo_xlsx_rs-0.1.2-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for turbo_xlsx_rs-0.1.2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6e5d36b05376770cd2df215b725fab30cc9e1c137ade1cadbe8951f5f4925e98
MD5 d95b0d9d0d79ebc46db503d574292c05
BLAKE2b-256 26ad3786e949a17e7adfec8a9aba5c37e2a1db20b9458abe8b9dd993cf2d9f55

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page