Skip to main content

Fast Python bindings for lite3 using zero-copy lazy parsing

Project description

pylite3

Fast, Zero-Copy Python bindings for lite3.

Python License Status

pylite3 provides high-performance access to lite3 formatted data. It follows the lazy-parsing philosophy (similar to pysimdjson or simdjson), allowing you to access specific fields in large documents instantly without paying the cost of full deserialization.

Data is read directly from the underlying memory buffer—Zero Copy.

🚀 Key Features

  • Zero-Copy Loading: Creates a proxy object in microseconds, regardless of document size.
  • Lazy Access: Values are only materialized to Python objects when you ask for them.
  • Memory Safe: Automatically manages the lifetime of the underlying buffer using Python's reference counting.
  • Pythonic API: Works like a dict (keys/values/items) or list (slicing/indexing), but faster.
  • Native Hooks: Supports object_hook, default, and more for custom serialization/deserialization.
  • Recursive Writers: Includes a dumps() function to serialize complex nested Python structures into lite3.

⚡ Benchmarks

Comparison vs pysimdjson for initial load time. Because pylite3 is lazy, it returns control to your program immediately.

Dataset Size pysimdjson (Parse) pylite3 (Lazy) Speedup
canada.json 2.25 MB 68,768 µs 5.7 µs 12,047x
citm_catalog.json 1.72 MB 49,471 µs 3.6 µs 13,803x
twitter.json 631 KB 24,189 µs 2.0 µs 12,354x

See Functionality & Performance for more details.


📦 Installation

Requires a C compiler and Python 3.9+.

# Using uv (Recommended)
uv pip install pysimdjson 

# Build from source
git clone --recurse-submodules https://github.com/fastserial/pylite3.git
cd pylite3
# If you already cloned without submodules:
git submodule update --init --recursive
uv pip install -e .

🛠 Usage

Reading Data

import pylite3

# Assume 'data' is bytes containing encoded lite3 data
obj = pylite3.loads(data)

# Access fields instantly
print(obj["users"][0]["name"])  # 'John Doe'

# Check types without converting
if obj["metadata"].is_object:
    print("Metadata found")

# Iterate object keys (new!)
for key in obj["users"][0]:
    print(f"User key: {key}")

# Slicing support (new!)
first_two_users = obj["users"][:2]

# Convert to standard dictionary
user_dict = dict(obj["users"][0])  # or .as_dict()

Writing Data

import pylite3

payload = {
    "id": 12345,
    "features": ["lazy", "fast"],
    "meta": {"version": 2.0}
}

# Serialize to bytes
encoded_bytes = pylite3.dumps(payload)

📚 Documentation


🤝 Contributing

Contributions are welcome! Please check the Makefile for useful development commands.

make install    # Install dependencies
make build      # Compile extension
make benchmark  # Run verification
make test       # Run E2E tests
make coverage   # Generate coverage report

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

pylite3-0.0.1.tar.gz (195.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pylite3-0.0.1-cp312-cp312-musllinux_1_2_x86_64.whl (501.3 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

pylite3-0.0.1-cp312-cp312-musllinux_1_2_i686.whl (482.6 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ i686

pylite3-0.0.1-cp312-cp312-musllinux_1_2_aarch64.whl (481.5 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

pylite3-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (507.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

pylite3-0.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (495.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

pylite3-0.0.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (477.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

pylite3-0.0.1-cp312-cp312-macosx_11_0_arm64.whl (75.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pylite3-0.0.1-cp311-cp311-musllinux_1_2_x86_64.whl (499.9 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

pylite3-0.0.1-cp311-cp311-musllinux_1_2_i686.whl (485.9 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ i686

pylite3-0.0.1-cp311-cp311-musllinux_1_2_aarch64.whl (488.9 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ ARM64

pylite3-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (503.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pylite3-0.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (499.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

pylite3-0.0.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (486.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

pylite3-0.0.1-cp311-cp311-macosx_11_0_arm64.whl (75.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file pylite3-0.0.1.tar.gz.

File metadata

  • Download URL: pylite3-0.0.1.tar.gz
  • Upload date:
  • Size: 195.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pylite3-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0ebbadf68a1887bdf7607cb29647393f227eccd2d00c30d68118fa3d0ca584ac
MD5 33e44ef5cb9abaf186cdaf96c726d333
BLAKE2b-256 63eb54465085029947b2777b98d90696f91beb22a7a14cb5a50d3704faba5320

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylite3-0.0.1.tar.gz:

Publisher: release.yml on trisongz/pylite3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylite3-0.0.1-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylite3-0.0.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9145b6731d79df945191d3f5bbbac27d5832f425309c46fe5dd9538110f8f0ab
MD5 9e133ae4acb9cd40df0f1ce86595f140
BLAKE2b-256 751de86899fbcd6d5081ac0fe5382a08e01776eb25c46d8a7c13d4053d38f151

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylite3-0.0.1-cp312-cp312-musllinux_1_2_x86_64.whl:

Publisher: release.yml on trisongz/pylite3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylite3-0.0.1-cp312-cp312-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for pylite3-0.0.1-cp312-cp312-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 22fa132e57ee31ab6107a7c213abde2f6cfcfb2c1494eb40584e94b9a6fd417d
MD5 9f6588b0faabc98667407357dd237d4b
BLAKE2b-256 39f4c1dc43e93ea84c81cb3f6c8dd13de240ff1577b6c78ec02e5f6e783026f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylite3-0.0.1-cp312-cp312-musllinux_1_2_i686.whl:

Publisher: release.yml on trisongz/pylite3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylite3-0.0.1-cp312-cp312-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pylite3-0.0.1-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 984ca650463561b1ebe52fe10e8dea7d0ff871499195f07e8b59241eb3067b99
MD5 cfa6ddc0cc5c7de84972315fdfd89b1a
BLAKE2b-256 21eec8e5f62fad343efcee28141ee3a88ebefe237ba9b36f2040272b5a542fc2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylite3-0.0.1-cp312-cp312-musllinux_1_2_aarch64.whl:

Publisher: release.yml on trisongz/pylite3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylite3-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylite3-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2381d49aaaedd8f9ab961a5550c065ab2385a9dcfe87fac7960ed9bd7e8049db
MD5 329da804356317947b08a0dd083d6878
BLAKE2b-256 3577e50b61d473ab227467d631cda14db33717dcd03ea6ffc32ad7b9a0459901

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylite3-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on trisongz/pylite3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylite3-0.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pylite3-0.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 65634c8db5a4f7c6278c78a50014e00f47a7b049e6293867a61a70ce8dd61e87
MD5 04fc568e21e1b4faa607a475032c4168
BLAKE2b-256 4a24dd46c79cd3c96d8d572e690a75fed5e64bef4190250df29dd4c359ee3710

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylite3-0.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on trisongz/pylite3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylite3-0.0.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pylite3-0.0.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 6c69bf9936f707fe9a17a3febb1e36eccbccef9925dfe88258bb7d3b829813ba
MD5 ece70aba5cd8f53bba0a253748824592
BLAKE2b-256 59ee2820e34cc8135b05c6dc0498893b56f5f71df72b2b9aebea58e89e440d95

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylite3-0.0.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl:

Publisher: release.yml on trisongz/pylite3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylite3-0.0.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylite3-0.0.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b4681fd47ff1686013fbdbf148c7f2025112b91dbae872dd28fbddbdb727b98a
MD5 670b3090f081b246229953f7232fa347
BLAKE2b-256 9d14b073ea5b849f8f399c759536ee4d9dd378080aea62bdef32c0f29a51a61b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylite3-0.0.1-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on trisongz/pylite3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylite3-0.0.1-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylite3-0.0.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d2871f0000b6f3829d74244c4ad34c733ad7c58277520be9ddcf7a195f6a8916
MD5 8381016935b48c9d9d2242295c3c196f
BLAKE2b-256 b28097dbeeb19aaf394360da941e4b851edd43dbe8273620574d9ffb80f891ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylite3-0.0.1-cp311-cp311-musllinux_1_2_x86_64.whl:

Publisher: release.yml on trisongz/pylite3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylite3-0.0.1-cp311-cp311-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for pylite3-0.0.1-cp311-cp311-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 ec376b0542f9f1943abc59605fd81a8db54a03fd740dd449421e86d7c7b51cb6
MD5 dad51d374e711155244cf3bf40075719
BLAKE2b-256 3fe741891d3f6809d55c5879381dd847cc889acbbdf5b8b19e320f6a2fe19574

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylite3-0.0.1-cp311-cp311-musllinux_1_2_i686.whl:

Publisher: release.yml on trisongz/pylite3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylite3-0.0.1-cp311-cp311-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pylite3-0.0.1-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 3f1698e61631a629a254beef8b9a20d7fa8016d29016141aeb0d94abc0e22aa6
MD5 20115d2c3026997f92ba0f553d6973be
BLAKE2b-256 d69578b38de1c7bf9970acefe3938ece43966af7f7ad996daee677a73679ca4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylite3-0.0.1-cp311-cp311-musllinux_1_2_aarch64.whl:

Publisher: release.yml on trisongz/pylite3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylite3-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylite3-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 680ab43e2ed7ebb639a9cfb1e17cc1be6258e0a3ff9a9c42c4a303f574b51d25
MD5 c0687b59ab59f842f07b3de351065902
BLAKE2b-256 215157cb00d8fa9a13e6791e87c1c20757e7e962aa3b635edd7470b36cf0c1ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylite3-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on trisongz/pylite3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylite3-0.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pylite3-0.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7d5d3db0fc5c4f72b4e159993d58d7107d06859f0e59dfaf0b8dbc89d0212814
MD5 91f42a9e5cf99e9b53b354d5d14dde9e
BLAKE2b-256 732bd5fdef56628c00d26ad4e7baef6bffc2a2668ab9bda5463452e3de9848c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylite3-0.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on trisongz/pylite3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylite3-0.0.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pylite3-0.0.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 add906efafc647e1e76356d8c79400b0731d22eed0168c0d0ad7735d434f6f4f
MD5 7771166b152633583868279da43dbaa6
BLAKE2b-256 2926133c6566aa497151ebf8f8cea0eafaaf1cff4cbcbafb0d874a7e25e99a6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylite3-0.0.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl:

Publisher: release.yml on trisongz/pylite3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylite3-0.0.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylite3-0.0.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0e8d03a3ee1c220de83c46b9507c8c0460568fc69de70a7109a9e500f359b002
MD5 028f05837ccce4edfa614cac6adafacb
BLAKE2b-256 34caa1f2e3fb25164491dcc5cb63ab289f3e4b94f5a108399304d8bd830ffddd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylite3-0.0.1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on trisongz/pylite3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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