Linden Lab Structured Data (LLSD) serialization library
Project description
llsd
Official python serialization library for Linden Lab Structured Data (LLSD).
Use
Install llsd with pip:
pip install llsd
Use llsd to parse/format your data:
import llsd
data = {"foo": "bar"}
# Format
data_xml = llsd.format_xml(data)
# >>> '<?xml version="1.0" ?><llsd><map><key>foo</key><string>bar</string></map></llsd>'
data_notation = llsd.format_notation(data)
# >>> "{'foo':'bar'}"
data_binary = llsd.format_binary(data)
# >>> '<?llsd/binary?>\n{\x00\x00\x00\x01k\x00\x00\x00\x03foos\x00\x00\x00\x03bar}'
# Parse
data = llsd.parse(data_xml)
# >>> {'foo: 'bar'}
data = llsd.parse(data_notation)
# >>> {'foo: 'bar'}
data = llsd.parse(data_binary)
# >>> {'foo: 'bar'}
Develop
Requirements:
Set up a venv and install development dependencies:
python3 -m venv .venv
. .venv/bin/activate
pip install .[dev]
Run tests:
pytest
Benchmarks
Benchmarks from commits to main
are published here.
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
llsd-1.2.2.dev1.tar.gz
(41.5 kB
view details)
Built Distributions
llsd-1.2.2.dev1-py3-none-any.whl
(22.9 kB
view details)
llsd-1.2.2.dev1-py2-none-any.whl
(22.9 kB
view details)
File details
Details for the file llsd-1.2.2.dev1.tar.gz
.
File metadata
- Download URL: llsd-1.2.2.dev1.tar.gz
- Upload date:
- Size: 41.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b76502db31c01cad6e9510377f1bbc18aa655a4141c95c1676d3e19e4c4ebdf |
|
MD5 | 0402be1e618e7f4cacb80d73c79d4195 |
|
BLAKE2b-256 | caebe65f8e6290712ddaa84cb0befa40444fabdc6ac8f867e7ef36250ed94ba0 |
File details
Details for the file llsd-1.2.2.dev1-py3-none-any.whl
.
File metadata
- Download URL: llsd-1.2.2.dev1-py3-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c292fdff4e6925097b2b7600d90314e407eeabddd683d1810cb2e7c79382cc4 |
|
MD5 | 2ed421be91f14a0cd51410621f010cd1 |
|
BLAKE2b-256 | 78708fd03f055b181b2bc279dbe42826f7b500f791a1a259455222e5277570c4 |
File details
Details for the file llsd-1.2.2.dev1-py2-none-any.whl
.
File metadata
- Download URL: llsd-1.2.2.dev1-py2-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d4b1aa58e586db38132386534582b8d069073552be28e2e8e9db0ffc516aaa0 |
|
MD5 | 7529009821b16af85c61d5b68c757ede |
|
BLAKE2b-256 | e7ea3dc6c4c2f3ae0253b949072068b0252073bdb33c12d1e67b6e7c33ee54f2 |