Skip to main content

libasslite

libasslite is a small PyO3 wrapper around the public libass rendering API. It owns the native library, renderer, and track handles and returns copied immutable image layers; no native pointer escapes into Python.

The wheel contains only the wrapper. It loads the parity-tested libass 0.17.1–0.17.5 range from the host at runtime, so applications can use the same system library as mpv. Set LIBASSLITE_LIBRARY or pass library_path= when automatic discovery cannot find it. The separately licensed libasslite-bundle package supplies a self-contained 0.17.5 runtime when installed; an explicit path still wins, and LIBASSLITE_BUNDLE=0 returns to system discovery.

from pathlib import Path

import libasslite

renderer = libasslite.AssRenderer(
    ass_bytes,
    fonts=[("subtitle-font.ttf", font_bytes)],
    library_path=Path("/opt/homebrew/lib/libass.dylib"),
)
result = renderer.render(
    timestamp_ms=1_500,
    frame_size=(3024, 1898),
    storage_size=(1920, 1080),
    margins=(98, 99, 0, 0),  # top, bottom, left, right
    use_margins=False,
    max_bitmap_bytes=16 * 1024 * 1024,
)
renderer.close()

AssRenderResult.layers preserves libass list order. Each layer contains a tightly packed bytes bitmap (width * height), placement, 0xRRGGBBAA color, and public image type. Rendering releases Python and is serialized per renderer, making one renderer safe to use from background workers. max_bitmap_bytes stops traversal before copying a layer that would exceed the aggregate bitmap budget; omit it only when the caller owns an equivalent bound.

Installing libass

  • macOS: brew install libass
  • Debian/Ubuntu: install the runtime package providing libass.so.9 (currently libass9)
  • Windows: vcpkg install libass:x64-windows, then point LIBASSLITE_LIBRARY at the produced DLL

An existing mpv installation may already contain a usable library. Pass its exact DLL path rather than copying it elsewhere; adjacent runtime dependencies must remain discoverable by the operating system.

Scope

The package deliberately exposes only in-memory ASS loading, memory fonts, frame/storage geometry, frame margins and margin policy, rendering, change detection, and copied image layers. It does not parse token spans, control mpv, schedule work, cache geometry, or bundle fonts/libass.

Licensing

libasslite is MIT. Its wheels do not distribute libass, FriBidi, HarfBuzz, FreeType, or a font provider; the dynamically loaded system installation keeps its own license and deployment obligations. See NOTICE.

Metadata

Release files for libasslite 0.1.2

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

Source distribution (sdist)

Source distribution for libasslite 0.1.2
File Size Uploaded
libasslite-0.1.2.tar.gz 18.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for libasslite 0.1.2
File
libasslite-0.1.2-cp315-abi3.abi3t-win_amd64.whl CPython 3.15 abi3t, abi3 Windows x86-64 Details
libasslite-0.1.2-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl CPython 3.15 abi3, abi3t Linux glibc 2.28+ x86-64 Details
libasslite-0.1.2-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl CPython 3.15 abi3t, abi3 Linux glibc 2.28+ ARM64 Details
libasslite-0.1.2-cp315-abi3.abi3t-macosx_11_0_arm64.whl CPython 3.15 abi3, abi3t macOS 11.0+ ARM64 Details
libasslite-0.1.2-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details
libasslite-0.1.2-cp314-cp314t-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 Details
libasslite-0.1.2-cp314-cp314t-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64 Details
libasslite-0.1.2-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details
libasslite-0.1.2-cp313-abi3-win_amd64.whl CPython 3.13 abi3 Windows x86-64 Details
libasslite-0.1.2-cp313-abi3-manylinux_2_28_x86_64.whl CPython 3.13 abi3 Linux glibc 2.28+ x86-64 Details
libasslite-0.1.2-cp313-abi3-manylinux_2_28_aarch64.whl CPython 3.13 abi3 Linux glibc 2.28+ ARM64 Details
libasslite-0.1.2-cp313-abi3-macosx_11_0_arm64.whl CPython 3.13 abi3 macOS 11.0+ ARM64 Details

Total release size: 2.7 MB

Release files / libasslite-0.1.2.tar.gz

Download URL libasslite-0.1.2.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
defb26cd046205f8917cb5a2fdbc4981c741cac4692a42ef749e4d39f5041206
BLAKE2b-256 checksum
How to use checksums
95732d5f9ce1827eb5734b24a0c6fbf89f17ea14160c7940b6016b769864f355
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

Release files / libasslite-0.1.2-cp315-abi3.abi3t-win_amd64.whl

Download URL libasslite-0.1.2-cp315-abi3.abi3t-win_amd64.whl
Size 161.3 kB
Tags CPython 3.15 Windows x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
581232315f319e18c4868c211b3a6061b0f60dde39e79264d98b2d6f875dac66
BLAKE2b-256 checksum
How to use checksums
e6ed9a28f6170e1ca5049ea53288d8b22466da95dcf72befcd4d87507052165a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

Release files / libasslite-0.1.2-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl

Download URL libasslite-0.1.2-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl
Size 265.0 kB
Tags CPython 3.15 Linux glibc 2.28+ x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
4a985698c0719a651400d46e68b7043042e0534cd1f50778956433711b8ed1be
BLAKE2b-256 checksum
How to use checksums
bec91511c133b610351a74bfe00dd7dbba7a0fcc2792e0bbd26527d52d18cd8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

Release files / libasslite-0.1.2-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl

Download URL libasslite-0.1.2-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl
Size 251.7 kB
Tags CPython 3.15 Linux glibc 2.28+ ARM64 abi3 abi3t
SHA-256 checksum
How to use checksums
61cb0e17c91aad1f2a5753dc06c9ccdeae48a44e1bcb7710c9e1f31cc4ace919
BLAKE2b-256 checksum
How to use checksums
a5424dd76ad5c0ca47caeaf67afa5dc750d9fd8e7806bb65a07f4e7181a64802
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

Release files / libasslite-0.1.2-cp315-abi3.abi3t-macosx_11_0_arm64.whl

Download URL libasslite-0.1.2-cp315-abi3.abi3t-macosx_11_0_arm64.whl
Size 236.1 kB
Tags CPython 3.15 abi3 abi3t macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
539598a4977eea483b0b9d4103042e0519a7bad5a435810f53fc94a259273f53
BLAKE2b-256 checksum
How to use checksums
6f817f278c3ce50f6a0cec0f1df13efa0d6912a9f3186f6de407a75c314f6ceb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

Release files / libasslite-0.1.2-cp314-cp314t-win_amd64.whl

Download URL libasslite-0.1.2-cp314-cp314t-win_amd64.whl
Size 156.2 kB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
cf2a483eb18328400fe4434258e9675dc20b03dc1bf8030c63bf6d1fff5449e0
BLAKE2b-256 checksum
How to use checksums
17da084a8be7c851d90152b6b15b12aee5da57f49e6cb7e4c323876b85559e4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

Release files / libasslite-0.1.2-cp314-cp314t-manylinux_2_28_x86_64.whl

Download URL libasslite-0.1.2-cp314-cp314t-manylinux_2_28_x86_64.whl
Size 259.9 kB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
071354924e8edb0fa4153da0863bf286e2420488cb01601202408fcb1ccfa384
BLAKE2b-256 checksum
How to use checksums
ec59e91dc03611082c76c6b32a93c0c894fc1d1f03b94de21681eeda529fa332
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

Release files / libasslite-0.1.2-cp314-cp314t-manylinux_2_28_aarch64.whl

Download URL libasslite-0.1.2-cp314-cp314t-manylinux_2_28_aarch64.whl
Size 248.1 kB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
162bdf5377158d31da3e01e676db1d89725b5a85a87469e23ce71acf71733805
BLAKE2b-256 checksum
How to use checksums
ad8c3ddb9d165f908c3ac022700005911209b01c2d04d90e4314bcf84454a4ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

Release files / libasslite-0.1.2-cp314-cp314t-macosx_11_0_arm64.whl

Download URL libasslite-0.1.2-cp314-cp314t-macosx_11_0_arm64.whl
Size 232.6 kB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4bff857dcfbca2754518624cfee72f0b25fd63b4864902465258560ccb1a14c0
BLAKE2b-256 checksum
How to use checksums
9589c666068b09af10501b65b257f583e8a9cbac4fea82382b3f3a6a2b981967
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

Release files / libasslite-0.1.2-cp313-abi3-win_amd64.whl

Download URL libasslite-0.1.2-cp313-abi3-win_amd64.whl
Size 156.4 kB
Tags CPython 3.13 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
aed317f900d2f7895f669dd11a6fd7af9e71989fb9b3e6256258c541db7ab18c
BLAKE2b-256 checksum
How to use checksums
5b38af49e2e1df2809062f382466f3355cdfe12c3c80c32b4ba245b08bab74ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

Release files / libasslite-0.1.2-cp313-abi3-manylinux_2_28_x86_64.whl

Download URL libasslite-0.1.2-cp313-abi3-manylinux_2_28_x86_64.whl
Size 259.9 kB
Tags CPython 3.13 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
ae58c2c5d76ee719d9b2f18b405067065e60a788dac900e65da4a7265d6f9fd1
BLAKE2b-256 checksum
How to use checksums
d5a6a8081b698ec49dc2c490c533978522a73174edf84f8b86cd9566a9e9f6fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

Release files / libasslite-0.1.2-cp313-abi3-manylinux_2_28_aarch64.whl

Download URL libasslite-0.1.2-cp313-abi3-manylinux_2_28_aarch64.whl
Size 247.9 kB
Tags CPython 3.13 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
78a9ea4a6a4747bfd3e2dfc7c8d7d96bd6a3207ff27b320882f80716aa8ca2fe
BLAKE2b-256 checksum
How to use checksums
e4f3773ae6539de06120565e0060329e89bad396042913816d31e6a46914580c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

Release files / libasslite-0.1.2-cp313-abi3-macosx_11_0_arm64.whl

Download URL libasslite-0.1.2-cp313-abi3-macosx_11_0_arm64.whl
Size 232.2 kB
Tags CPython 3.13 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1cba923b90134f598dfb24b2cd23311d94c179c0fb158df1d575886a4193fe13
BLAKE2b-256 checksum
How to use checksums
774f3aa02a888fa7384afdbc0d271a9d0f1500c2e3081da701421a1b95a2aa0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

13 release files

0.2.0

13 release files

This release

0.1.2 This release

13 release files

0.1.0

13 release files

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