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.17.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.17-cp312-cp312-win_amd64.whl (193.8 kB view details)

Uploaded CPython 3.12Windows x86-64

mmobeus_luadata-0.1.17-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.17-cp312-cp312-manylinux_2_34_aarch64.whl (327.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

mmobeus_luadata-0.1.17-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.17.tar.gz.

File metadata

  • Download URL: mmobeus_luadata-0.1.17.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.17.tar.gz
Algorithm Hash digest
SHA256 c82f72ac0dd28134ab12e172af95241817b36e2f5b0085e3b5f12059ebdcb445
MD5 1e303a8ee2e84315c8fe061d479bde71
BLAKE2b-256 8efe78860f77414220f2b21226f880a8ae51eaa60063f190157cf36591c92923

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmobeus_luadata-0.1.17.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.17-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.17-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 69a1012dea83d1174ffe877863e6ef74e064869a12f5e37c4ac3671210b9f7fd
MD5 883f0162b85515b591eff29434315dd1
BLAKE2b-256 94617eff26ba430e56a144e9e261e428a6a4510ba7aca746ecf0beea7f24ee45

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmobeus_luadata-0.1.17-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.17-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.17-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a0d8fa1f1d888a850aade6ce6348bd95ab5df9cb64693210e9ffca1aea549402
MD5 7e6dc012ebc63c180114e4860cc6240f
BLAKE2b-256 2a2a1f45d12a165215c9f6dcc9e83f587ec9b6e456f072c9d5f7e6880346ff9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmobeus_luadata-0.1.17-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.17-cp312-cp312-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.17-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 50b2574e5f446b1669fa496ef312e69c34dfc1da572aabe59a71c4c57a70e31e
MD5 b1c42824f9ca232f5a1a25061980870e
BLAKE2b-256 b9ab90afcac58cd9b89dfee9ed752fa398c6d9d0b104a1191f2e3e34e76bb707

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmobeus_luadata-0.1.17-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.17-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.17-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1c068f38bd5da9d649b41f5ca630b1d4f2160eb277861d2bbd6447c08ba94692
MD5 3ae3078cb329ce7eb9c8432f276a5645
BLAKE2b-256 745738c8b8c1666865e2d2b3219d5962c577faa0b4212d601f36942bd743c65c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmobeus_luadata-0.1.17-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.17-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.17-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f5c3c62ba3f9c7e0a405b5cd514440cf91a0979896028d7a442a260ef67baf9c
MD5 e79d641b3b99b7e90e137495107252d0
BLAKE2b-256 cd9300012bcb3079724859bdf3994f892994b1e6af6e19784013668bbe16197c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmobeus_luadata-0.1.17-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