Metadata-Version: 2.4
Name: LinkPython-extern
Version: 1.3.0
Summary: A Python wrapper for Ableton Link, wheels included!
Keywords: ableton,ableton link,link,music,sync
Author: gonzaloflirt
Maintainer: thegamecracks
License-Expression: Unlicense
License-File: LICENSE.md
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python
Classifier: Topic :: System :: Networking
Project-URL: Homepage, https://github.com/thegamecracks/link-python
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# LinkPython-extern

[![PyPI](https://img.shields.io/pypi/v/LinkPython-extern?label=View%20on%20pypi&style=flat-square)](https://pypi.org/project/LinkPython-extern/)
[![Lints](https://img.shields.io/github/actions/workflow/status/thegamecracks/link-python/ruff-check.yml?style=flat-square&logo=ruff&label=lints)](https://github.com/thegamecracks/link-python/actions/workflows/ruff-check.yml)
[![Tests](https://img.shields.io/github/actions/workflow/status/thegamecracks/link-python/pytest.yml?style=flat-square&logo=pytest&label=tests)](https://github.com/thegamecracks/link-python/actions/workflows/pytest.yml)
[![Types](https://img.shields.io/github/actions/workflow/status/thegamecracks/link-python/type-check.yml?style=flat-square&logo=ty&label=types)](https://github.com/thegamecracks/link-python/actions/workflows/type-check.yml)
[![Style](https://img.shields.io/github/actions/workflow/status/thegamecracks/link-python/ruff-format.yml?style=flat-square&logo=ruff&label=style)](https://github.com/thegamecracks/link-python/actions/workflows/ruff-format.yml)

A Python wrapper for [Ableton Link], forked from gonzaloflirt's [link-python]
to streamline the user experience with new methods, type stubs, and pre-built
wheels.

```py
from link import Link

link = Link(120)
clock = link.clock()
micros = clock.micros()

state = link.captureAppSessionState()
beat = state.beatAtTime(micros, 4)
phase = state.phaseAtTime(micros, 4)
```

You can see the full API documentation in [`__init__.pyi`], or look at
the [LinkHut.py] example which is equivalent to Ableton Link's
[linkhut] example.

For asyncio usage, consider trying out artfwo's [aalink] project!

## Installation

This project can be installed from PyPI under the [LinkPython-extern] name:

```sh
pip install LinkPython-extern
```

Note that we are *not* the same as [LinkPython], which is a different fork
of link-python by munshkr.

## Python compatibility

|                | v1.0.0 | v1.0.1 | v1.0.4 | v1.1.0 | v1.2.0 | v1.3.0 | main |
|----------------|:------:|:------:|:------:|:------:|:------:|:------:|:----:|
| CPython 3.6    |  ✅   |  ✅    |  ✅   |  ❌    |  ❌   |   ❌   |  ❌  |
| CPython 3.7    |  ✅   |  ✅    |  ✅   |  ✅    |  ❌   |   ❌   |  ❌  |
| CPython 3.8    |  ✅   |  ✅    |  ✅   |  ✅    |  ✅   |   ❌   |  ❌  |
| CPython 3.9    |  ✅   |  ✅    |  ✅   |  ✅    |  ✅   |   ✅   |  *️⃣  |
| CPython 3.10   |  ✅   |  ✅    |  ✅   |  ✅    |  ✅   |   ✅   |  *️⃣  |
| CPython 3.11   |  ❌   |  ✅    |  ✅   |  ✅    |  ✅   |   ✅   |  *️⃣  |
| CPython 3.12   |  ❌   |  ❌    |  ✅   |  ✅    |  ✅   |   ✅   |  *️⃣  |
| CPython 3.13¹  |  ❌   |  ❌    |  ❌   |  ✅    |  ✅   |   ✅   |  *️⃣  |
| CPython 3.14   |  ❌   |  ❌    |  ❌   |  ❌    |  ✅   |   ✅   |  *️⃣  |
| CPython 3.15+  |  ❌   |  ❌    |  ❌   |  ❌    |  ❌   |   *️⃣   |  *️⃣  |

✅ This library version provides prebuilt wheels on PyPI for the given Python version.

*️⃣ This library version does not provide prebuilt wheels,
   but may be compiled from source.

❌ This library version cannot be compiled for the given Python version.

¹ CPython 3.13's experimental free-threading builds are not supported.

## Building from source

If you want to build this package from source, you will need CMake and a suitable
C++ compiler like g++ (Linux) or [MSVC](https://visualstudio.microsoft.com/visual-cpp-build-tools/) (Windows).

To explicitly compile from a PyPI release:

```sh
pip install LinkPython-extern --no-binary LinkPython-extern
```

To compile from our main branch:

```sh
pip install git+https://github.com/thegamecracks/link-python
```

To compile from a clone of the repository, make sure to clone all
Git submodules beforehand:

```sh
git clone --recurse-submodules https://github.com/thegamecracks/link-python
pip install .
# or, if already cloned:
git submodule update --init --recursive
pip install .
```

## License

This project is written under [Unlicense] but also depends on,
among other libraries, [Ableton Link] and [pybind11].
Please mind the licenses of those libraries and their dependencies.

[Ableton Link]: https://github.com/ableton/link.git
[link-python]: https://github.com/gonzaloflirt/link-python
[`__init__.pyi`]: https://github.com/thegamecracks/link-python/blob/master/src-py/link/__init__.pyi
[LinkHut.py]: https://github.com/thegamecracks/link-python/blob/master/example/LinkHut.py
[linkhut]: https://github.com/Ableton/link/blob/master/examples/linkhut/main.cpp
[aalink]: https://github.com/artfwo/aalink
[LinkPython-extern]: https://pypi.org/project/LinkPython-extern/
[LinkPython]: https://github.com/munshkr/link-python
[Unlicense]: https://github.com/thegamecracks/link-python/blob/master/LICENSE.md
[pybind11]: https://github.com/pybind/pybind11
