Skip to main content

Python client and development tools for the Laminar Research X-Plane Web API

Project description

xpwebapi

xpwebapi is a Python client and development toolkit for the Laminar Research X-Plane Web API, including REST, async REST, WebSocket, UDP, beacon discovery, and a strictly read-only capture worker.

This is an independently maintained fork of devleaks/xplane-webapi. TV Productions thanks Pierre Mareschal and devleaks for creating the original library. The upstream source reported version 3.5.0 when this fork's extension work began; TV Productions maintains releases beginning with 4.0.0.

This project is not endorsed by or affiliated with the upstream maintainer or Laminar Research. X-Plane is a trademark of Laminar Research.

Installation

Requires Python 3.12 or 3.13.

pip install xpwebapi

Quick start

import xpwebapi

with xpwebapi.rest_api(api_version="v2") as api:
    clock = api.dataref("sim/cockpit2/clock_timer/local_time_seconds")
    print(api.dataref_value(clock))

Read-only capture worker

The installed xpwebapi-capture command records a bounded, versioned stream of configured X-Plane DataRefs without exposing command execution or DataRef writes. WebSocket is the primary capture transport. UDP is the diagnostic/fallback capture transport.

See the capture guide and capture protocol reference.

Documentation

Full documentation is available at https://tvproductions.github.io/xplane-webapi/.

Development

git clone https://github.com/tvproductions/xplane-webapi.git
cd xplane-webapi
uv sync
uv run python -m unittest discover -v

License

MIT. See LICENSE.

Project details


Download files

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

Source Distribution

xpwebapi-4.0.0.tar.gz (80.2 kB view details)

Uploaded Source

Built Distribution

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

xpwebapi-4.0.0-py3-none-any.whl (92.3 kB view details)

Uploaded Python 3

File details

Details for the file xpwebapi-4.0.0.tar.gz.

File metadata

  • Download URL: xpwebapi-4.0.0.tar.gz
  • Upload date:
  • Size: 80.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for xpwebapi-4.0.0.tar.gz
Algorithm Hash digest
SHA256 ff9ae7827fc8d7b7e6c8e2bdbf80b0ab0d954f1fa737b883e0b8ac28fbb61196
MD5 a3a0984a6cc90e21bfd5a09a7390a366
BLAKE2b-256 407ba2ac9d34f0753329d372b983fe0eceb841cc9ed4722b91c05ceb748e5679

See more details on using hashes here.

Provenance

The following attestation bundles were made for xpwebapi-4.0.0.tar.gz:

Publisher: release.yml on tvproductions/xplane-webapi

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

File details

Details for the file xpwebapi-4.0.0-py3-none-any.whl.

File metadata

  • Download URL: xpwebapi-4.0.0-py3-none-any.whl
  • Upload date:
  • Size: 92.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for xpwebapi-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c53f3ae06bfdc93bffd723569f4c52d835f3ad936205493546764e540f42ba36
MD5 df738aae16c589768c7b9176e78a55cd
BLAKE2b-256 0c3bee5f600e6032bda70f0d360a8ba8d35eb3013f16f8c09f59817ad771543d

See more details on using hashes here.

Provenance

The following attestation bundles were made for xpwebapi-4.0.0-py3-none-any.whl:

Publisher: release.yml on tvproductions/xplane-webapi

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