Skip to main content

PEP 561 type stubs for Ableton Live's Python API (for MIDI Remote Script developers)

Project description

ableton-live-stubs

PEP 561 type stubs for Ableton Live 12.3.6's Python API (Live.* modules).

These stubs are for developers building MIDI Remote Scripts (Control Surfaces) that run inside Ableton Live's embedded Python runtime. They provide type information for the Live module that Live exposes to scripts at runtime but is not available for static analysis outside of Live.

Installation

pip install ableton-live-stubs

Usage

Once installed, type checkers (pyright, mypy) automatically discover the Live module stubs. No configuration needed.

Import types under TYPE_CHECKING to avoid runtime import errors (the Live module only exists inside Ableton Live's Python runtime):

from __future__ import annotations
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    import Live
    from Live.Song import Song

def on_tempo_changed(song: Song) -> None:
    app: Live.Application.Application = Live.Application.get_application()
    print(f"Live {app.get_major_version()}: tempo is now {song.tempo}")

Manual setup (without pip)

Download the zip from the GitHub release and add the extracted directory (the parent of Live/) to your type checker's stub path:

// pyrightconfig.json
{
  "stubPath": "path/to/Live-stubs"
}

Version matching

Each release of ableton-live-stubs corresponds to a specific Ableton Live version. Install the version that matches your target Live version — the API surface changes between releases.

Documentation

For detailed API documentation — including property restrictions (e.g. which track/clip types support a given property), valid input ranges, and observable properties — see the LiveAPI reference.

The stubs are best-effort and have known limitations: types are conservative (args without a pinned-down type stay as object), names are decorative (PEP 570 positional-only markers prevent kwarg calls), and docstrings come verbatim from Live's runtime Boost.Python __doc__ strings. See Limitations & caveats in the repo README for the full posture and the current list of known weak spots.

Source

Generated from runtime introspection of Ableton Live 12.3.6. See LiveAPI for details.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ableton_live_stubs-12.3.6.post7.tar.gz (55.7 kB view details)

Uploaded Source

Built Distribution

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

ableton_live_stubs-12.3.6.post7-py3-none-any.whl (85.3 kB view details)

Uploaded Python 3

File details

Details for the file ableton_live_stubs-12.3.6.post7.tar.gz.

File metadata

File hashes

Hashes for ableton_live_stubs-12.3.6.post7.tar.gz
Algorithm Hash digest
SHA256 cd9f827343348b1a7f6e0278ade3f8905c671c4380493d4881e7efdbe41fc5a8
MD5 a2ca5b58b51654c1a987799ba80f2ce0
BLAKE2b-256 6a6e6d5d10268b3c104f885d9ee49e805c59d53b05f57ea07d398111f268bcbb

See more details on using hashes here.

Provenance

The following attestation bundles were made for ableton_live_stubs-12.3.6.post7.tar.gz:

Publisher: release.yml on PhotonicVelocity/LiveAPI

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

File details

Details for the file ableton_live_stubs-12.3.6.post7-py3-none-any.whl.

File metadata

File hashes

Hashes for ableton_live_stubs-12.3.6.post7-py3-none-any.whl
Algorithm Hash digest
SHA256 6621486565ba42c2b8e4429863f997d65e55e7990740b225ea204ab5fcd81ed5
MD5 67d7bf8f77722b2230b7ec0f8e7ce1b6
BLAKE2b-256 ea0270d9ceb73d06533d07515c1b47eee0eca712a0ae159127525c704e30ea3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ableton_live_stubs-12.3.6.post7-py3-none-any.whl:

Publisher: release.yml on PhotonicVelocity/LiveAPI

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