| 1 | # Public API |
| 2 | |
| 3 | ## What Is Public |
| 4 | |
| 5 | Every module documented under [API Reference](index.md) is public API. |
| 6 | This includes: |
| 7 | |
| 8 | ### Core Library |
| 9 | |
| 10 | | Module | Import Path | |
| 11 | |--------|-------------| |
| 12 | | {class}`~libtmux.Server` | `from libtmux.server import Server` | |
| 13 | | {class}`~libtmux.Session` | `from libtmux.session import Session` | |
| 14 | | {class}`~libtmux.Window` | `from libtmux.window import Window` | |
| 15 | | {class}`~libtmux.Pane` | `from libtmux.pane import Pane` | |
| 16 | | Common | `from libtmux.common import ...` | |
| 17 | | Neo | `from libtmux.neo import ...` | |
| 18 | | Options | `from libtmux.options import ...` | |
| 19 | | Hooks | `from libtmux.hooks import ...` | |
| 20 | | Constants | `from libtmux.constants import ...` | |
| 21 | | Exceptions | `from libtmux.exc import ...` | |
| 22 | |
| 23 | ### Test Utilities |
| 24 | |
| 25 | | Module | Import Path | |
| 26 | |--------|-------------| |
| 27 | | Test helpers | `from libtmux.test import ...` | |
| 28 | | Pytest plugin | `libtmux.pytest_plugin` (auto-loaded) | |
| 29 | |
| 30 | ## What Is Internal |
| 31 | |
| 32 | Modules under `libtmux._internal` and `libtmux._vendor` are **not public**. |
| 33 | They may change or be removed without notice between any release. |
| 34 | |
| 35 | Do not import from: |
| 36 | - `libtmux._internal.*` |
| 37 | - `libtmux._vendor.*` |
| 38 | |
| 39 | ## Pre-1.0 Stability Policy |
| 40 | |
| 41 | libtmux is pre-1.0. This means: |
| 42 | |
| 43 | - **Minor versions** (0.x -> 0.y) may include breaking API changes |
| 44 | - **Patch versions** (0.x.y -> 0.x.z) are bug fixes only |
| 45 | - **Pin your dependency**: use `libtmux>=0.55,<0.56` or `libtmux~=0.55.0` |
| 46 | |
| 47 | Breaking changes are documented in the [changelog](../history.md) and |
| 48 | the [deprecations](deprecations.md) page before removal. |
| 49 | |
| 50 | ## Deprecation Process |
| 51 | |
| 52 | Before removing or changing public API: |
| 53 | |
| 54 | 1. A deprecation warning is added for at least one minor release |
| 55 | 2. The change is documented in [deprecations](deprecations.md) |
| 56 | 3. Migration guidance is provided |
| 57 | 4. The old API is removed in a subsequent minor release |