Skip to main content

Parsled

Python package for parsing Sled and serializing Python objects as Sled.

Sled is a serialization language for developer-friendly reading and writing.

Setup

parsled is available on PyPI. You can install it using your preferred Python package manager. For example:

pip install parsled

Parse: Sled to Python dict

To parse a str of Sled into a Python dict, call from_sled().

sled_text = '''
name = "John Doe"
age = 50
children = [Jack ; Jill]
'''

data = parsled.from_sled(sled_text)

assert data == {
    "name": "John Doe",
    "age": 50,
    "children": ["Jack", "Jill"],
}

To parse a Sled file, read it to a str, then pass that into from_sled().

with open("path/to/my_file.sled", mode="r") as f:
    sled_text = f.read()
    data = parsled.from_sled(sled_text)

Serialize: Python object to Sled

We have 2 main ways to serialize Python objects.

  1. Call to_sled().
  2. Instantiate a SledSerializer and call its to_sled() method.

Both have the same configuration options and defaults. For details, refer to the SledSerializer documentation.

Approach #1 simply does approach #2 under the hood. Approach #2 may be useful if you want to set a configuration once and reuse that for serialization multiple times.

data = {}
other_data = {}

# Approach #1
sled_output = parsled.to_sled(data)

# Approach #2
sled_serializer = parsled.SledSerializer()
sled_output = sled_serializer.to_sled(data)
other_sled_output = sled_serializer.to_sled(other_data)

Metadata

Release files for parsled 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for parsled 0.2.1
File Size Uploaded Provenance Actions
parsled-0.2.1.tar.gz 23.9 kB Without provenance Details for parsled-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for parsled 0.2.1
File Interpreter ABI Platform Actions
parsled-0.2.1-py3-none-any.whl Python 3 none any Details for parsled-0.2.1-py3-none-any.whl

Total release size: 53.9 kB

Release files / parsled-0.2.1.tar.gz

Download URL parsled-0.2.1.tar.gz
Size 23.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a2d25025b80dcf1ff72e2d7811f4a027f262cae17cdba231258a0185a01664eb
BLAKE2b-256 checksum
How to use checksums
53ddfb761b4b58dc5ca2d708ed0608d0bd8aa2422bfdf70cab78e2982dbfc9fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / parsled-0.2.1-py3-none-any.whl

Download URL parsled-0.2.1-py3-none-any.whl
Size 30.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64fb9198d0f63146f72e227385a3d83716e3e63c92e8de67a76551efbfe1877d
BLAKE2b-256 checksum
How to use checksums
bcb50b6c9e3f5bcd1f525e3b871aaba13d32cf42e8e74c5253ca7721abae4113
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for parsled 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page