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_parse-0.1.1.tar.gz (74.4 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_parse-0.1.1-cp38-abi3-win_amd64.whl (575.6 kB view details)

Uploaded CPython 3.8+Windows x86-64

turbo_xlsx_rs_parse-0.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (696.9 kB view details)

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

turbo_xlsx_rs_parse-0.1.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (669.5 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

turbo_xlsx_rs_parse-0.1.1-cp38-abi3-macosx_11_0_arm64.whl (630.1 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

Details for the file turbo_xlsx_rs_parse-0.1.1.tar.gz.

File metadata

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

File hashes

Hashes for turbo_xlsx_rs_parse-0.1.1.tar.gz
Algorithm Hash digest
SHA256 10817b804e6ddabb9bbf18e2e0e080bc294fcd9b390bc7a7afb728ad0fe9e2be
MD5 518ab155a677e70c3682b4854e3066d3
BLAKE2b-256 48d0c7a66bf73f8a4786297d41347a690b6c0f2184389288c85cb143409f1005

See more details on using hashes here.

File details

Details for the file turbo_xlsx_rs_parse-0.1.1-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for turbo_xlsx_rs_parse-0.1.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4172f42da21f41119f8d08e110040dada80af0bd036dfbc17505fa2333228da9
MD5 596a355a188a872cec51c92caaa0a2a0
BLAKE2b-256 1a275f28a8c3a4bf5c4fcf346db45f6a04fb05b53f74e01a28f41297fdd1c13c

See more details on using hashes here.

File details

Details for the file turbo_xlsx_rs_parse-0.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for turbo_xlsx_rs_parse-0.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2d3ef97972e044324a080aab9f7c0d8d29d624bcb8b178ca3ec0365a6a1cb56e
MD5 9e268d4fcf71ac6b50806c1d385d0465
BLAKE2b-256 64b11e22c376085a81a7c21a4e4b1fcb812a589d39d383711f4d4fb0ce7407ef

See more details on using hashes here.

File details

Details for the file turbo_xlsx_rs_parse-0.1.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for turbo_xlsx_rs_parse-0.1.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 89349a10aa4cf8fa6c3fe0d1be37729bd50cb4fc72da23a9a026cfd414e11dbc
MD5 0c722518a4d83edda8b0dfb9e3c30ef8
BLAKE2b-256 7f1ee841f1236f9ad4bc414a0ffdee411574b904482b35bfad3612f00f2a21d7

See more details on using hashes here.

File details

Details for the file turbo_xlsx_rs_parse-0.1.1-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for turbo_xlsx_rs_parse-0.1.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7a6c498c4e1d419adaa02f16105ba4d2ea23872fd15b8ea3e888dc032dcbec8a
MD5 1f35acd38f5d2bbeb660d3953ccd14bc
BLAKE2b-256 49c6c1bce025f0cd65d80443ecc41a6510e8916a7ac739da16bb31a61fac0d2f

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