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

Uploaded CPython 3.12Windows x86-64

mmobeus_luadata-0.1.16-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.16-cp312-cp312-manylinux_2_34_aarch64.whl (327.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

mmobeus_luadata-0.1.16-cp312-cp312-macosx_11_0_arm64.whl (291.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mmobeus_luadata-0.1.16-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.16.tar.gz.

File metadata

  • Download URL: mmobeus_luadata-0.1.16.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.16.tar.gz
Algorithm Hash digest
SHA256 8240c74dd078589a26352936a8cf0cd26fad6a1420e1e246164b5152cff6ca44
MD5 aaf580a1055bb1d6c72a1cf5db64f4eb
BLAKE2b-256 786800e7a8e65158febdf9ccc5b1c44a600dc2c598f89d55072a0e38540ff08d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.16-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e8b1e8bef3747c44f8b09defc00ddc0ce010a0c37fd5556060b93f0790bb890d
MD5 e2c09f1aea711b14b209218e81bb7858
BLAKE2b-256 c99cf676fa4cdbe784966f56bbfbfcd8bf1057658311b0c0c547265742bbbfb2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.16-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 fabfe79132211428cf77ba7b219513a7a5fef2e4aab8f410368efa3afd62f560
MD5 4fa7dbab89e46b79b3c6f8f739e5f887
BLAKE2b-256 66ff848bf9851b9e8f9ba5cf071222fec2a722ec3c17438079adb5363961308e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.16-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 110f9e0f8dd80ddbbf85283c3622fc8b645870f2078d172443e7e2fc0ac381bf
MD5 e0e973bd1cea6b0ffa6f19aca74f4113
BLAKE2b-256 53103d1351aac251f831df6bb4e6e2453aa376c4820b2c9f0a2387ec4ddc6e76

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.16-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d5c5c64b5b83fbf59324483364a7c55b9ce9e4d846d8abeb27d1ec328bf557d0
MD5 5feebc9c10e6ddfd6954afe9d5781201
BLAKE2b-256 f607c8c04a9d06a88e84bad4710db33fe925f9e50d76aada567ee99a5e737a66

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.16-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b480e8b68f302e4b9a06610a481ae47f6e1294c92c92433cc346aeae1f042c38
MD5 aebecf38ce66af79ed3e2aab36446bb9
BLAKE2b-256 e9600c35414a82d639912f1620a1eedc040bc0c640136dd55fe4352f4aa40a5c

See more details on using hashes here.

Provenance

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