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.1.tar.gz (36.6 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.1-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.1-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.1-cp39-abi3-win_amd64.whl (958.8 kB view details)

Uploaded CPython 3.9+Windows x86-64

l3d_rs_python-0.2.1-cp39-abi3-musllinux_1_2_x86_64.whl (1.4 MB view details)

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

l3d_rs_python-0.2.1-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.1-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.1-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.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: l3d_rs_python-0.2.1.tar.gz
  • Upload date:
  • Size: 36.6 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.1.tar.gz
Algorithm Hash digest
SHA256 f2270ab48ad93ec96c61e210421a075e1b549c7c76ef8e297dcd1825c526f3b3
MD5 05a3d4f7f31347d8c79d1f1314da94dc
BLAKE2b-256 9f37a15e655ca78dec81a4900901de6b6a4ad38f3ba8c099e6e7d2d941af8561

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.1.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.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for l3d_rs_python-0.2.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1aaf64b4869812375d1168526adc8bedd6366fc1ff6a79afd324887779b7b1cb
MD5 b89b6f759b8db73a2447765d8db0ed04
BLAKE2b-256 5d5eac5410d01773fa60d36185091cc5de5a663c9057cc83281977cc7bacced1

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.1-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.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for l3d_rs_python-0.2.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4ad4f3427a5196595f7595e30e09df8b01aeb3a31109636c87bd92416d6ed53e
MD5 231e60da5d154746eb191992a401a2e9
BLAKE2b-256 5646a7b59e0e81c4545f868d362602608034a8eb09a6a25d9694a83ec3fc79b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.1-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.1-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for l3d_rs_python-0.2.1-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c7a04d8a4795926722857b05db2c6027cea2150dbec8e1bb15334af963c70723
MD5 6bd91dc5e33841c93d7d94e9d6127472
BLAKE2b-256 6a37995d377dee4ed064c9b35e1775b6055388b86691a333e4af30e73de6cc21

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.1-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.1-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for l3d_rs_python-0.2.1-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c47a8b39239c4f1585dcba46383632ed4cadd92a2632f2736cc7c8c4a7d93fc6
MD5 30db4d368bbab10a92c2978bf7c7c450
BLAKE2b-256 68fd1e321a67591a9df6018df0c29acab495e176d6479c815e55232c616db184

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.1-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.1-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for l3d_rs_python-0.2.1-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 52569dac132fdc09712f6666e3ed194991ff31706a92d5e756b84d75236bbed6
MD5 4a2ae267ceb9e81a13ee9afb7311de5e
BLAKE2b-256 053f2754cf018a9038180f9ef7fa1a223329529ececd100df64437bf218b7e2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.1-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.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for l3d_rs_python-0.2.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 326e2e6faa90b3831d3e8fae281ec22402ce338af81084b85bec2ff126b699a1
MD5 12daaad832b99f49f62826a47302ce50
BLAKE2b-256 2df5f5a3b651357fa303854c76d9a2fe678d2a673e26a61aafb9c1e15b66bd63

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.1-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.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for l3d_rs_python-0.2.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 673bfdd90ced6815139ce07cfb1945564233ffd083f6cd2a6cd4774e0efc1398
MD5 2f382a452c3d9bce81d4ef21826c015b
BLAKE2b-256 a13c47b9d0290898b2f0568a2245755cd95baa6ecd7c73cc4975e21f30127b74

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.1-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.1-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for l3d_rs_python-0.2.1-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3767bc6d98b6fd12ae3d5e52b4fc7b7bd3f2c14b1cb940b1a63161d155801b1e
MD5 c3192ebd30b3fedb646b3ac070c2ab00
BLAKE2b-256 23d6faaa25c1d8dc0120bee0496322bbf3bb97d5aca13dc84533efe0eb348fca

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.1-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.1-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for l3d_rs_python-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 590f7e7742651823cce501d686b912164a161af8aa6d3889ae04c8358b4e1234
MD5 6e48f168906ef7bf23a1f431406a1640
BLAKE2b-256 2a540bca1edd56a8f2a624e7f6ba3b485f604362c7d971848de8cf8312959586

See more details on using hashes here.

Provenance

The following attestation bundles were made for l3d_rs_python-0.2.1-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