llsd


Namellsd JSON
Version 1.2.4 PyPI version JSON
download
home_pagehttps://github.com/secondlife/python-llsd
SummaryLinden Lab Structured Data (LLSD) serialization library
upload_time2024-04-02 06:38:58
maintainerNone
docs_urlNone
authorLinden Research, Inc.
requires_pythonNone
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # llsd

[![codecov](https://codecov.io/gh/secondlife/python-llsd/branch/main/graph/badge.svg?token=Y0CD45CTNI)](https://codecov.io/gh/secondlife/python-llsd)

Official python serialization library for [Linden Lab Structured Data (LLSD)][llsd].

## Use

Install **llsd** with pip:
```
pip install llsd
```

Use **llsd** to parse/format your data:
```py
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:

- [pre-commit](https://pre-commit.com/)

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](https://secondlife.github.io/python-llsd/dev/bench/).

[llsd]: https://wiki.secondlife.com/wiki/LLSD
[llbase]: https://pypi.org/project/llbase/



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/secondlife/python-llsd",
    "name": "llsd",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Linden Research, Inc.",
    "author_email": "opensource-dev@lists.secondlife.com",
    "download_url": "https://files.pythonhosted.org/packages/17/e6/0132c89a40bdd87d29bbf406a5a8c50efd63cbb698b5569dbebfddffb25d/llsd-1.2.4.tar.gz",
    "platform": null,
    "description": "# llsd\n\n[![codecov](https://codecov.io/gh/secondlife/python-llsd/branch/main/graph/badge.svg?token=Y0CD45CTNI)](https://codecov.io/gh/secondlife/python-llsd)\n\nOfficial python serialization library for [Linden Lab Structured Data (LLSD)][llsd].\n\n## Use\n\nInstall **llsd** with pip:\n```\npip install llsd\n```\n\nUse **llsd** to parse/format your data:\n```py\nimport llsd\n\ndata = {\"foo\": \"bar\"}\n\n# Format\n\ndata_xml = llsd.format_xml(data)\n# >>> '<?xml version=\"1.0\" ?><llsd><map><key>foo</key><string>bar</string></map></llsd>'\ndata_notation = llsd.format_notation(data)\n# >>> \"{'foo':'bar'}\"\ndata_binary = llsd.format_binary(data)\n# >>> '<?llsd/binary?>\\n{\\x00\\x00\\x00\\x01k\\x00\\x00\\x00\\x03foos\\x00\\x00\\x00\\x03bar}'\n\n# Parse\n\ndata = llsd.parse(data_xml)\n# >>> {'foo: 'bar'}\ndata = llsd.parse(data_notation)\n# >>> {'foo: 'bar'}\ndata = llsd.parse(data_binary)\n# >>> {'foo: 'bar'}\n```\n\n## Develop\n\nRequirements:\n\n- [pre-commit](https://pre-commit.com/)\n\nSet up a venv and install development dependencies:\n```\npython3 -m venv .venv\n. .venv/bin/activate\npip install .[dev]\n```\n\nRun tests:\n```\npytest\n```\n\n### Benchmarks\n\nBenchmarks from commits to `main` are published [here](https://secondlife.github.io/python-llsd/dev/bench/).\n\n[llsd]: https://wiki.secondlife.com/wiki/LLSD\n[llbase]: https://pypi.org/project/llbase/\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Linden Lab Structured Data (LLSD) serialization library",
    "version": "1.2.4",
    "project_urls": {
        "Homepage": "https://github.com/secondlife/python-llsd"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "72bd9d5a3cdc1ef63e182e22e6eff2b9b5c3bc7fe3fcaedb505c81ead0a86f07",
                "md5": "688aa9aae1643919a6492a07e97c23b2",
                "sha256": "3e58c0c98cf400ef59677e522d2a8742ceea2a703fbbe33ef514ebefa99c7a2b"
            },
            "downloads": -1,
            "filename": "llsd-1.2.4-py2-none-any.whl",
            "has_sig": false,
            "md5_digest": "688aa9aae1643919a6492a07e97c23b2",
            "packagetype": "bdist_wheel",
            "python_version": "py2",
            "requires_python": null,
            "size": 22869,
            "upload_time": "2024-04-02T06:38:55",
            "upload_time_iso_8601": "2024-04-02T06:38:55.577281Z",
            "url": "https://files.pythonhosted.org/packages/72/bd/9d5a3cdc1ef63e182e22e6eff2b9b5c3bc7fe3fcaedb505c81ead0a86f07/llsd-1.2.4-py2-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "85619cee6739a249bfd81457213594a0cc19cbf7bb9df24d324af01004df4816",
                "md5": "a77b86d0d7840e2c3049bbeeccfb71f6",
                "sha256": "69ebe8ee52c18315ff9a7249ff9b0890a03dcf8bba1718a9ce47e2057faf38aa"
            },
            "downloads": -1,
            "filename": "llsd-1.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a77b86d0d7840e2c3049bbeeccfb71f6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 22865,
            "upload_time": "2024-04-02T06:38:57",
            "upload_time_iso_8601": "2024-04-02T06:38:57.029625Z",
            "url": "https://files.pythonhosted.org/packages/85/61/9cee6739a249bfd81457213594a0cc19cbf7bb9df24d324af01004df4816/llsd-1.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "17e60132c89a40bdd87d29bbf406a5a8c50efd63cbb698b5569dbebfddffb25d",
                "md5": "d61eab7eaf45cbcc4ce7d0c19c7cf631",
                "sha256": "12a3c3742dce2e2e45912ac9e07142f74d205cba255bd0af6e645637af680c40"
            },
            "downloads": -1,
            "filename": "llsd-1.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "d61eab7eaf45cbcc4ce7d0c19c7cf631",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 58984,
            "upload_time": "2024-04-02T06:38:58",
            "upload_time_iso_8601": "2024-04-02T06:38:58.015559Z",
            "url": "https://files.pythonhosted.org/packages/17/e6/0132c89a40bdd87d29bbf406a5a8c50efd63cbb698b5569dbebfddffb25d/llsd-1.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-02 06:38:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "secondlife",
    "github_project": "python-llsd",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "llsd"
}
        
Elapsed time: 0.20923s