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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

mmobeus_luadata-0.1.15-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.15.tar.gz.

File metadata

  • Download URL: mmobeus_luadata-0.1.15.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.15.tar.gz
Algorithm Hash digest
SHA256 195db68ed4ed375eaae92d18e160c703b9ef2555312ba0c043ffd1664602063b
MD5 c3fa03b7fa65d65d078a241821000aca
BLAKE2b-256 18b512fb96b5320c2b9e518aa603fa9c0312935e2b9c0de3542c512cffa56c9d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.15-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0842d3e2a48a969acef06c15a0a7a33fe4346afeebe99e14945237648dbb408b
MD5 24fb007f23a329794eced77c7a38a4e6
BLAKE2b-256 fc70025a367c748b70a32e4dda47de0e362f35202b70bde2f43412d3434a638d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.15-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 05ec996a2ce1f678abf8a669bf446c116db07b99e936cece604b20daa4c97604
MD5 46e40b273ae9e5a0ec13a3bc2fa37de4
BLAKE2b-256 11567029e0c0650cd243a510aa6df520d49cccfde378d5468a6980d9c3451640

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.15-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 bc2898e7dfe5144d40ff773b6ee439013300c2cde3dd094b0d6cae885203f021
MD5 2643ec5bc9c19f1c864b6085c13d19fc
BLAKE2b-256 cbbf9257b2c300a936cb73cdbc5884c416fbdbc9e9574c0494900a0249ace1d9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.15-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c6af9a1b405a96355f826c0cff8b69bc5372af1cd5cc777c02c308ff573a485e
MD5 36bea9f73560846e2fd76edc2e693e65
BLAKE2b-256 3abbd1afe4f14e22346e2c2f15d296fe863d92dde73139d04b3d395ab88267c8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mmobeus_luadata-0.1.15-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 16df6eec7981d99f0f64a1ea6d27bbda50fa8958621464edfc9a0d75d71d3220
MD5 c8bfd55dc266db24cfde46aa36d83e61
BLAKE2b-256 9b69c199b14eacd9ea1786cc41500a091fd6d0d148b274a7cd4e885714b2e54b

See more details on using hashes here.

Provenance

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