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 keyword arguments for three option groups:

  • 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.14.tar.gz (28.6 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.14-cp312-cp312-win_amd64.whl (154.1 kB view details)

Uploaded CPython 3.12Windows x86-64

mmobeus_luadata-0.1.14-cp312-cp312-manylinux_2_34_x86_64.whl (301.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

mmobeus_luadata-0.1.14-cp312-cp312-manylinux_2_34_aarch64.whl (296.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

mmobeus_luadata-0.1.14-cp312-cp312-macosx_11_0_arm64.whl (263.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mmobeus_luadata-0.1.14-cp312-cp312-macosx_10_12_x86_64.whl (264.0 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: mmobeus_luadata-0.1.14.tar.gz
  • Upload date:
  • Size: 28.6 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.14.tar.gz
Algorithm Hash digest
SHA256 a8901d9138d68c75cf68e4d59a09f0bab3d851699cb00deb35a4aa81d084d1a8
MD5 925ad0093f4d14e542d925429b182398
BLAKE2b-256 58f6a4d81a06139be9bbf379076e95d2c98b7be2b9bcc7da20f594bee834808c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.14-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ca55d89e38ab98f5c75727fb65e34ecf5f086a419d935425f531044d085ee709
MD5 520b80ade6bec16a5505a81a34a8738a
BLAKE2b-256 7f120a5bfffdcd5b91cf0c918bddaf9702c931cf9ecc110291d385de8cafd978

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.14-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4fdd6b8c52d5192f402db9899bfd2bf1b09f7c922d800df5080b4aa7f653e0f6
MD5 2b98a79e9377427a32c4bde0a9fd15a4
BLAKE2b-256 577fab3f494866294ffb862faf5988c2bbcbeff31d8cb0e8e60cbbe28d540709

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.14-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 13606621270ea5e1e6e3b9dbd5620641bd3e15bae4df5a878af06246b3388b4a
MD5 878bc88b35fbe712920884605f0a08e8
BLAKE2b-256 45dbae49c4b91bb4e48886b82b4ff3629edfc465f019639de3884f86e433786a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.14-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2ac4bbd637ba6f1164252340ef856cf1e02c4c9de8f8b9ccb23ba52a4d74d8c8
MD5 9152b80b02c763df326c61e879e5ecd8
BLAKE2b-256 82166a6febfed818d54a5924ef905cd8ab142b3f5a625b83ba2603ba56d24779

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.14-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 be0ed7c1d6f251b4ebef6620e147fc54fa3a8a2d967181819e2e374ea6052407
MD5 88289b0f6cfd517b2ff491ac2632a10b
BLAKE2b-256 51e915a6d0fd15dec2f9660c423d62d1e18933fd7fb515a558a36bc58cd99079

See more details on using hashes here.

Provenance

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