Serialize and unserialize Python list & dictionary between Lua table.
Project description
luadata
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
pythonvariable toluadata string, and save to specific path.
import luadata
luadata.write(path, data, encoding="utf-8", indent="\t", prefix="return ")
read
Unserialize
luadata string topythonvariable from file.
import luadata
data = luadata.read(path, encoding="utf-8")
serialize
Serialize
pythonvariable toluadata string.
import luadata
luadata.serialize(var, encoding="utf-8", indent="\t", indent_level=0)
unserialize
Unserialize
luadata string topythonvariable.
import luadata
luadata.unserialize(luadata_str, encoding="utf-8", multival=False)
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cffdfe889fd42b9de44c786c3cfd6591d35ff66ccf1812d0cbd2a3bbc6ddaf0
|
|
| MD5 |
afdf42a99c1e51b029229a64c971fcad
|
|
| BLAKE2b-256 |
ece528449a81d76660d42058d095dad77c88e046423277c803b2bf35fd457e06
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0ff43e65fb7dada87cdfc0e5b0f089de2e1080f6857f866b377a485c0694edf
|
|
| MD5 |
00a82fe10e3a0ea2d0185b90d69c0c50
|
|
| BLAKE2b-256 |
3315d8db71cf0af4577e4f86d9d7dc230fb6cb5cd354a26ff524651521b8e8fb
|