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.2.tar.gz (75.7 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.2-cp38-abi3-win_amd64.whl (574.7 kB view details)

Uploaded CPython 3.8+Windows x86-64

turbo_xlsx_rs_parse-0.1.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (695.5 kB view details)

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

turbo_xlsx_rs_parse-0.1.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (669.0 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

turbo_xlsx_rs_parse-0.1.2-cp38-abi3-macosx_11_0_arm64.whl (630.0 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for turbo_xlsx_rs_parse-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bf2153d6081a4a5e192bbe5232a9b8f4b38e897b30c56fdfb973b1b465670c2e
MD5 404032564bac02f14786b66f0a0d165c
BLAKE2b-256 d845226bf318b3c1fb7d8afd89285abc7b4fed45d4603453c561dedc031433e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for turbo_xlsx_rs_parse-0.1.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4e4a3235e9ad42482d137c636ed75960c196c42c1eba8531075f371f1fac2f76
MD5 87386664a36a594b53c920ebc0c76e8e
BLAKE2b-256 0a5835d02f653f181a5aa8a0c7475ac3d64c33702f5470aebdf162e263d4f458

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for turbo_xlsx_rs_parse-0.1.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b59d63c6d316fbd4c38aa4b626aefa1fdefc056875397aeb097b6c874b7749d2
MD5 d3df097944776e54cc5f007bb8d34dd5
BLAKE2b-256 162a9c2f1a756292734271e4be9e80f9b0519e830868ae924a5aaadfbb70bfcc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for turbo_xlsx_rs_parse-0.1.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9038eb4c9ce9c22e7a6be33862f3dd40d9515c46b654cb0db853065ec2ccb230
MD5 63a9983a3b09e74beff846ebb6560b5a
BLAKE2b-256 1585e0dda242d53d6db997e58045e55d08112dc088b371d84bd0bcad13e4adba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for turbo_xlsx_rs_parse-0.1.2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4e43edff67e5d3c2c82ce4d56f5b467aca658d1f8e9b4b563878fb33dd86dd5f
MD5 9d02a4d0b2934d611b7c816c6db03adc
BLAKE2b-256 5aea21c5c2b0bdac35dfd72aadc7ede5641c447f609abdd45f559fc12171b4f3

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