Skip to main content

Serialize and unserialize Python list & dictionary between Lua table.

Project description

luadata

Build Status PyPI

This is a Python package that can serialize Python list & dictionary to Lua table, or unserialize Lua table to Python list & dictionary.

Install

Binary installers for the latest released version are available at the Pypi.

python -m pip install --upgrade luadata

Usage

write

Serialize python variable to lua data string, and save to specific path.

import luadata

luadata.write(path, data, encoding="utf-8", indent="\t", prefix="return ")

read

Unserialize lua data string to python variable from file.

import luadata

data = luadata.read(path, encoding="utf-8")

serialize

Serialize python variable to lua data string.

import luadata

luadata.serialize(var, encoding="utf-8", indent="\t", indent_level=0)

unserialize

Unserialize lua data string to python variable.

import luadata

luadata.unserialize(luadata_str, encoding="utf-8", multival=False)

License

BSD

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

luadata-1.0.5.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

luadata-1.0.5-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file luadata-1.0.5.tar.gz.

File metadata

  • Download URL: luadata-1.0.5.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10

File hashes

Hashes for luadata-1.0.5.tar.gz
Algorithm Hash digest
SHA256 7cffdfe889fd42b9de44c786c3cfd6591d35ff66ccf1812d0cbd2a3bbc6ddaf0
MD5 afdf42a99c1e51b029229a64c971fcad
BLAKE2b-256 ece528449a81d76660d42058d095dad77c88e046423277c803b2bf35fd457e06

See more details on using hashes here.

File details

Details for the file luadata-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: luadata-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10

File hashes

Hashes for luadata-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e0ff43e65fb7dada87cdfc0e5b0f089de2e1080f6857f866b377a485c0694edf
MD5 00a82fe10e3a0ea2d0185b90d69c0c50
BLAKE2b-256 3315d8db71cf0af4577e4f86d9d7dc230fb6cb5cd354a26ff524651521b8e8fb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page