Skip to main content

aiopjlink2

A modern Python asyncio PJLink library (Class 1 and Class 2). This is a fork from HEInventions/aiopjlink and Kwull/aiopjlink.

PyPI PyPI - License PyPI - Python Version

PyPI - Downloads GitHub repo size

Many projectors with an RJ45 connection can be controlled using PJLink.

PJLink is a communication protocol and unified standard for operating and controlling data projectors over TCP/IP, regardless of manufacturer.

It supports both Class 1 commands and Class 2 notifications and extensions.

  • Class 1 covers basic commands such as power on/off, input selection, and volume control.
  • Class 2 adds extended functionality such as lens control and projector-specific notifications.

What is aiopjlink2?

aiopjlink2 is a typed, asyncio-based Python library for controlling PJLink-compatible projectors.

The library keeps the ergonomic API of the earlier forks while modernizing the project around the current Python tooling ecosystem:

  • ✅ Modern asyncio API with high-level command groups
  • ✅ Fully typed public API (py.typed package)
  • ✅ Pure Python implementation with no runtime dependency beyond the PJLink transport stack
  • ✅ Cross-platform CI for Python 3.11–3.13
  • ✅ Development container and uv-based tooling
  • ✅ One connection per command, with no connection manager to keep around

Installation

pip install aiopjlink2

Usage

Each PJLink command opens a short-lived TCP connection, sends the request, and closes the socket again. You create one PJLink instance and then call the high-level API on it.

import asyncio

from aiopjlink import PJLink


async def main() -> None:
    link = PJLink(address="192.168.1.120", password="secret")

    await link.power.turn_on()
    await asyncio.sleep(5)
    print("errors =", await link.errors.query())
    await asyncio.sleep(5)
    await link.power.turn_off()


asyncio.run(main())

The library exposes command groups such as power, sources, mute, lamps, errors, and info on the PJLink object.

Development

The project uses uv for dependency management and development tasks, with Hatchling for packaging and Ruff, Mypy, and Pyright for quality checks.

uv sync --group dev

uv run pytest
uv run ruff check .
uv run ruff format --check .
uv run mypy src
uv run pyright

The repository also includes a dev container configured for Python 3.13 and the uv toolchain, along with recommended VS Code extensions for Python, Pylance, Ruff, and TOML support.

Set the environment variable AIOPJLINK_PRINT_DEBUG_COMMS to print PJLink traffic to the console for debugging.

Project automation

This repository includes GitHub Actions workflows for:

  • linting and static analysis
  • tests on Linux, macOS, and Windows
  • Python 3.11, 3.12, and 3.13 coverage
  • build verification and PyPI release publishing

The package is published from the src layout and is versioned via git metadata.

Roadmap

Pull requests with test cases are welcome. There are still some things to finish, including:

  • Search Protocol (§3.2)
  • Status Notification Protocol (§3.3)

Metadata

Release files for aiopjlink2 1.2.0

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

Source distribution (sdist)

Source distribution for aiopjlink2 1.2.0
File Size Uploaded Provenance Actions
aiopjlink2-1.2.0.tar.gz 78.8 kB With provenance Details for aiopjlink2-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aiopjlink2 1.2.0
File Interpreter ABI Platform Actions
aiopjlink2-1.2.0-py3-none-any.whl Python 3 none any Details for aiopjlink2-1.2.0-py3-none-any.whl

Total release size: 92.5 kB

Release files / aiopjlink2-1.2.0.tar.gz

Download URL aiopjlink2-1.2.0.tar.gz
Size 78.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e427fc44ec4315bcb166487f8ddc742d102d48e258084a41ed7fe8a7ffe3b9fc
BLAKE2b-256 checksum
How to use checksums
864dc43a2f44e777813da064b6001205cc9b45478b623afc1c346c7158e0af91
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 Oct 5, 2026.

Transparency log

Release files / aiopjlink2-1.2.0-py3-none-any.whl

Download URL aiopjlink2-1.2.0-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06f3c841a6757727aa5a65cd6ac483e6e41422a3a09ccd499efa4653112c9097
BLAKE2b-256 checksum
How to use checksums
1d460925b9f3b0cd6dfdbf4e2b4a3811b01c88d2c56076ed8cbea22e7c70573c
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 Oct 5, 2026.

Transparency log

Security for aiopjlink2 1.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aiopjlink2-1.2.0.tar.gz

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 Oct 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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