Skip to main content

Convert Lua data files (e.g. WoW SavedVariables) to JSON/Python objects

Project description

mmobeus-luadata

Python bindings for luadata — parse Lua data files (such as World of Warcraft SavedVariables) and convert to JSON or Python dicts. Powered by Rust via PyO3.

Install

pip install mmobeus-luadata

Usage

from luadata import lua_to_json, lua_to_dict

# Get JSON string
json_str = lua_to_json('playerName = "Thrall"')

# Get Python dict
data = lua_to_dict('playerName = "Thrall"')

# With options
data = lua_to_dict(lua_string,
    array_mode="sparse",
    array_max_gap=10,
    empty_table="array",
    string_max_len=1024,
    string_mode="truncate",
)

Options

Both functions accept named arguments for four option groups:

  • Schema (schema, unknown_fields) — provide a JSON Schema string to guide type decisions, overriding heuristics
  • String transform (string_max_len, string_mode, string_replacement) — limit string length during parsing (truncate, empty, redact, replace)
  • Array detection (array_mode, array_max_gap) — control how integer-keyed Lua tables map to JSON arrays (sparse, index-only, none)
  • Empty tables (empty_table) — choose how empty Lua tables render in JSON (null, omit, array, object)

See the full options documentation for details and examples.

Links

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

mmobeus_luadata-0.1.18.tar.gz (32.8 kB view details)

Uploaded Source

Built Distributions

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

mmobeus_luadata-0.1.18-cp312-cp312-win_amd64.whl (193.8 kB view details)

Uploaded CPython 3.12Windows x86-64

mmobeus_luadata-0.1.18-cp312-cp312-manylinux_2_34_x86_64.whl (338.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

mmobeus_luadata-0.1.18-cp312-cp312-manylinux_2_34_aarch64.whl (327.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

mmobeus_luadata-0.1.18-cp312-cp312-macosx_11_0_arm64.whl (291.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mmobeus_luadata-0.1.18-cp312-cp312-macosx_10_12_x86_64.whl (296.4 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

Details for the file mmobeus_luadata-0.1.18.tar.gz.

File metadata

  • Download URL: mmobeus_luadata-0.1.18.tar.gz
  • Upload date:
  • Size: 32.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mmobeus_luadata-0.1.18.tar.gz
Algorithm Hash digest
SHA256 45d0b31e298dbc3411691c20bb0cef8390e5245930a79f8737e750345bcf0757
MD5 4a34f9dca5d4c07e273557e8b932a9c2
BLAKE2b-256 c69d008782a67b1e148eb8a36f49f3ffe986f9a73e6487663079d5ff602f42af

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmobeus_luadata-0.1.18.tar.gz:

Publisher: release.yml on mmobeus/luadata

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mmobeus_luadata-0.1.18-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.18-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3e3e66433b0761317225067da05b44ac3e77450e97c69d900d30fcf0b6930b41
MD5 dfbcfb3ad3736ed38a7a99890b40cbe8
BLAKE2b-256 2efcb1b3bf60f75397ff3cbc6d4c099820221de88d723aebaa95519c900c0d92

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmobeus_luadata-0.1.18-cp312-cp312-win_amd64.whl:

Publisher: release.yml on mmobeus/luadata

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mmobeus_luadata-0.1.18-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.18-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8fe0bde27b2a77ab4eb400ba23a99ad77444fa24a376bf73af309a7522207889
MD5 7d6abd06adbabde8549b548ed252d121
BLAKE2b-256 e4aa7e198658e854cab61ef92a766ecb7e900b8d742b4ffa52318fb6c0240fa0

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmobeus_luadata-0.1.18-cp312-cp312-manylinux_2_34_x86_64.whl:

Publisher: release.yml on mmobeus/luadata

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mmobeus_luadata-0.1.18-cp312-cp312-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.18-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 42cfb87594a7bbe019eeb2d68947567dcff7f0c274c8a1b9a658ab7a914bafb4
MD5 fccbdb5805579cd6591ad92d390d1c60
BLAKE2b-256 6caa4e36877330a52141d3cd86b01215ec77e8d46b99c9ee436cd93a95588f9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmobeus_luadata-0.1.18-cp312-cp312-manylinux_2_34_aarch64.whl:

Publisher: release.yml on mmobeus/luadata

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mmobeus_luadata-0.1.18-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.18-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 affeba78453ce299be6db908f6899bbcbe0a3e0d0e5c1766267bb94c47065b32
MD5 157e41e76263d151273600602a0a0362
BLAKE2b-256 c5e742e7200e5576b1abf8e114e03d031bfc0f140e2659702cc8aefc379ba3fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmobeus_luadata-0.1.18-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on mmobeus/luadata

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mmobeus_luadata-0.1.18-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.18-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 99a02086fd87fc5691cbce94084442f7e44e651f06f606bcaaa4f041a91309e1
MD5 08344dea0dc9d72610259718a240ecb0
BLAKE2b-256 4b37f4973d8414b536c6d787665b535190ee0f3f0f0bf5648ecf68ecc8372b8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmobeus_luadata-0.1.18-cp312-cp312-macosx_10_12_x86_64.whl:

Publisher: release.yml on mmobeus/luadata

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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