> ## Documentation Index
> Fetch the complete documentation index at: https://torqpy.itsdote.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Install

> Install torqpy from PyPI or an editable git checkout, with optional native extensions.

## PyPI

```bash theme={null}
pip install torqpy
```

```python theme={null}
import torq   # package name on PyPI is torqpy; import is torq
```

On platforms with a matching binary wheel (manylinux, macOS, Windows release builds), that install already includes `torq._vm` and `torq._audio`. Timing, shreds, cues, `SimClock`, and lab need no native code either way.

## Editable checkout

```bash theme={null}
git clone https://github.com/valid22/torq.py.git
cd torq.py
pip install -e ".[dev]"
python3 -m unittest discover -s torq/tests
```

## Optional native extensions

`torq.audio` and `torq.native_clock` need the compiled extensions. Prefer a binary wheel from PyPI. When no matching wheel is available (or you are on a git checkout), build both `_vm` and `_audio` from the included sources:

```bash theme={null}
# toolchain: C++17 compiler, Python headers, PortAudio
# (e.g. portaudio19-dev / brew install portaudio)
TORQ_NATIVE=1 pip install 'torqpy[native]'
# from a git checkout:
TORQ_NATIVE=1 pip install -e '.[native]'
```

`TORQ_NATIVE=1` tells the setuptools `Extension` build to compile; the `[native]` extra documents that you want the native feature set. In-place helpers remain as `bash torq/native/build_vm.sh` / `build_audio.sh` if you prefer not to reinstall.

## Packages at a glance

| Import | Role |
| - | - |
| `torq` | Core timing, `SimClock`, Shared, operators, lab re-exports |
| `torq.cues` | MIDI / DMX schedules and lane tags |
| `torq.lab` | Protocols, sessions, DAQ stubs |
| `torq.audio` | UGen graph + STK (needs `_audio`) |
| `torq.native_clock` | C++-backed clock matching Python semantics (needs `_vm`) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.