Skip to main content

Python bindings for l3d-rs - L3D luminaire file format parser

Project description

l3d-rs-python

PyPI License: GPL-3.0

Python bindings for l3d_rs - a Rust library for parsing L3D (Luminaire 3D) files.

Installation

pip install l3d-rs-python

Quick Start

import l3d

# Parse from file
data = l3d.from_file("luminaire.l3d")

# Or from bytes
with open("luminaire.l3d", "rb") as f:
    data = l3d.from_bytes(f.read())

# Access the parsed data
print(f"Parts: {len(data['model']['parts'])}")
print(f"Assets: {len(data['file']['assets'])}")

# Each part has a path and transformation matrix
for part in data['model']['parts']:
    print(f"  {part['path']}: {len(part['mat'])} matrix values")

# Access raw asset data
for asset in data['file']['assets']:
    print(f"  {asset['name']}: {asset['size']} bytes")

API

l3d.from_file(path: str) -> dict

Parse an L3D file from a file path.

l3d.from_bytes(data: bytes) -> dict

Parse an L3D file from bytes.

Return Value

Both functions return a dictionary with the following structure:

{
    "model": {
        "parts": [
            {
                "path": "geometry/lamp.obj",
                "mat": [1.0, 0.0, 0.0, 0.0, ...]  # 16 floats (4x4 matrix)
            },
            ...
        ]
    },
    "file": {
        "assets": [
            {
                "name": "geometry/lamp.obj",
                "size": 12345,
                "content": b"..."  # Raw bytes
            },
            ...
        ]
    }
}

What is L3D?

L3D is a ZIP-based file format for 3D luminaire geometry, used in the lighting industry alongside GLDF. It contains:

  • structure.xml - Geometry hierarchy with transformation matrices
  • OBJ files - 3D mesh data
  • Optional textures and materials

License

GPL-3.0-or-later

Related

  • l3d_rs - Core Rust library
  • l3d-egui - 3D Viewer (Desktop & WASM)
  • GLDF - Global Lighting Data Format

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

l3d_rs_python-0.2.3.tar.gz (39.1 kB view details)

Uploaded Source

Built Distributions

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

l3d_rs_python-0.2.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

l3d_rs_python-0.2.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

l3d_rs_python-0.2.3-cp39-abi3-win_amd64.whl (958.6 kB view details)

Uploaded CPython 3.9+Windows x86-64

l3d_rs_python-0.2.3-cp39-abi3-musllinux_1_2_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ x86-64

l3d_rs_python-0.2.3-cp39-abi3-musllinux_1_2_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

l3d_rs_python-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

l3d_rs_python-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

l3d_rs_python-0.2.3-cp39-abi3-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

l3d_rs_python-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file l3d_rs_python-0.2.3.tar.gz.

File metadata

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

File hashes

Hashes for l3d_rs_python-0.2.3.tar.gz
Algorithm Hash digest
SHA256 9d6cf2afc63619742851bee77921b044598e6b7573c25a86bb0ee0af85c18874
MD5 bae414264b68dbb040d7dcd9ee478158
BLAKE2b-256 7c3ca15e0cc682d3c972941fb20e258603ce099f2944618eec2131f22cfd3bac

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.3.tar.gz:

Publisher: python-publish.yml on holg/l3d_rs

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

File details

Details for the file l3d_rs_python-0.2.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for l3d_rs_python-0.2.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 75d3650084cc28157d8134f0079712b9e3930ed7bf93a7cbb5c1418266073154
MD5 f74510ebf132621bc7348f63bbae7b3b
BLAKE2b-256 7331455e00533a7c9a603a27bcd637986e6f9fcf70729b0a79e692077ee39ce1

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: python-publish.yml on holg/l3d_rs

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

File details

Details for the file l3d_rs_python-0.2.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for l3d_rs_python-0.2.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 32f54ab88c94f1ccb81efd671a3e4c1a7c2beb2278c25048e3d50a3740ec8d79
MD5 ba21ff205a5319483dcd44a146c97f2c
BLAKE2b-256 dc2788df645d320846746023e83b31569a08ba4f6b32c3e96f0be72f5f5997bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: python-publish.yml on holg/l3d_rs

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

File details

Details for the file l3d_rs_python-0.2.3-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: l3d_rs_python-0.2.3-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 958.6 kB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for l3d_rs_python-0.2.3-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c89d9fb623fbb2ce37043fdb8c5306a2298048509cbf79ff8f6d0ed4ffe8d82b
MD5 f9f2b27ab37dfedc2d233a0c57097e9b
BLAKE2b-256 3c818f3b04516ed324d359f8d9a588d2c91b40451347aefab0aef530967cfcc3

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.3-cp39-abi3-win_amd64.whl:

Publisher: python-publish.yml on holg/l3d_rs

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

File details

Details for the file l3d_rs_python-0.2.3-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for l3d_rs_python-0.2.3-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 07c5e1f6056fb90791e284f4e19ec958f1327df5b78ce214d71904c3e4ab08a4
MD5 23f6c749170805459f83250168aedb4c
BLAKE2b-256 be243c970497c19374eac38a2022380e7d913306d18f351abfd8b260649ad399

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.3-cp39-abi3-musllinux_1_2_x86_64.whl:

Publisher: python-publish.yml on holg/l3d_rs

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

File details

Details for the file l3d_rs_python-0.2.3-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for l3d_rs_python-0.2.3-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 b1c9d20201f0f951357a9a431268fd66218fd07f46313435ae2752c0b40fffac
MD5 2109613e38f20eb0432541f65d6b767d
BLAKE2b-256 5782adbb8c673bd7d9df263ebd3fd334762fdbb80f727f6c1b5795e08ee07fed

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.3-cp39-abi3-musllinux_1_2_aarch64.whl:

Publisher: python-publish.yml on holg/l3d_rs

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

File details

Details for the file l3d_rs_python-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for l3d_rs_python-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cecc40d73c132ba36c87ad99b02b7bcc7b8ae59732cf2fcb49e2ba25fc057c0a
MD5 a150568c5b47682202778527231488e2
BLAKE2b-256 e84f8ff305a7f00982524cd47a7e6920541ce14becd1b350f11eb00ec218f28e

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-publish.yml on holg/l3d_rs

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

File details

Details for the file l3d_rs_python-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for l3d_rs_python-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 176ae5ae78e70771b82a0bbe0b4a1e99eb96851542b1d7f6365b9cc995ddf5d0
MD5 bdf058d06f09e12c56cc07c9fa1d6d51
BLAKE2b-256 32802a2e2298122f50ef8506e77e55d940569141ace98aac6ceb86228ba36b04

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: python-publish.yml on holg/l3d_rs

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

File details

Details for the file l3d_rs_python-0.2.3-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for l3d_rs_python-0.2.3-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d6aa28cc10e875640b1b99e26a8450cf49d07d43f6d666c0d89d251c0d5b3a5e
MD5 fd633be8af3a7b4d04729b4ef0a1ab20
BLAKE2b-256 228317c92a45466867e407bc66614379d9ba2c6d5b5e332864b00ea3b392dce3

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.3-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: python-publish.yml on holg/l3d_rs

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

File details

Details for the file l3d_rs_python-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for l3d_rs_python-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 96ae1dcb4e8710dafae03c0491d764bfebc011b092c997e69a5409f353dacc05
MD5 449b8c0f2d0bd2d34892f95a2f218eb5
BLAKE2b-256 3b6166691870a0012186c5007717ac9648dff49a3d247f21b389e5b032ac6166

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl:

Publisher: python-publish.yml on holg/l3d_rs

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