Skip to main content

Modern, type-safe, python library for controlling PlaneWave devices

Project description

pypi versions License: MIT pwi/test

PlaneWave Interface

Modern, type-safe, zero-dependency python library for controlling PlaneWave devices through the PWI4 HTTP interface.

Installation

uv add pwi

or

using your preferred environment / package manager of choice, e.g., poetry, conda or pip:

pip install pwi
poetry add pwi
conda install pwi

Usage

from pwi import (
    BaseMountAlignmentMode,
    PlaneWaveHTTPXClient,
    PlaneWaveMountDeviceInterface,
    PlaneWaveMountDeviceParameters,
)

# Create a new PlaneWave HTTPX client:
client = PlaneWaveHTTPXClient(host="localhost", port=8220)

# Define the parameters for the PlaneWave Mount device:
params: PlaneWaveMountDeviceParameters = PlaneWaveMountDeviceParameters(
    name="PlaneWave L350 Alt-Az Mount",
    description="PlaneWave Mount Interface (HTTP)",
    alignment=BaseMountAlignmentMode.ALT_AZ,
    latitude=33.87047,
    longitude=-118.24708,
    elevation=0.0,
    did="0", # Device ID
    vid="",  # Vendor ID
    pid="",  # Product ID
)

# Create a new PlaneWave Mount device interface:
mount = PlaneWaveMountDeviceInterface(
    id=0,
    params=params,
    client=client,
)

# Initialise the mount:
mount.initialise()

# Get the current status of the mount:
status = mount.get_status()

...

As the pwi instance is fully typed, you can use your IDE's autocompletion to see all the available methods and properties.

We have also provided further usage examples in the examples directory.

Milestones

  • Type-safe modern 3.6+ Python
  • Fully unit tested
  • Simpler API (modelled around the ASCOM Alpaca API)
  • Integration testing with HIL testing (hardware-in-the-loop)
  • Zero-external dependencies (no numpy, astropy etc for portability)
  • Example API usage
  • Fully supported PlaneWave Mount operations
  • Fully supported PlaneWave Focuser operations
  • Fully supported PlaneWave Rotator operations
  • Fully seasoned recipes for usage with numpy, astropy et al.
  • ASCOM Alpaca APIs w/Fast API

Disclaimer

This project is not affiliated with PlaneWave Instruments or observable.space in any way. It is a community-driven project. All trademarks and logos are the property of their respective owners. The PWI4 software is the property of PlaneWave Instruments.

License

This project is licensed under the terms of the MIT 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

pwi-0.14.0.tar.gz (73.6 kB view details)

Uploaded Source

Built Distribution

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

pwi-0.14.0-py3-none-any.whl (30.5 kB view details)

Uploaded Python 3

File details

Details for the file pwi-0.14.0.tar.gz.

File metadata

  • Download URL: pwi-0.14.0.tar.gz
  • Upload date:
  • Size: 73.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pwi-0.14.0.tar.gz
Algorithm Hash digest
SHA256 3e5aa463ba9064c4485b2e5ef0fca9c3ff9cad98e0cd81c831dc580d11b6ae1d
MD5 a7b766526ea10a5d26a77f5db94ba70a
BLAKE2b-256 11b33fe87fdeed687ec6911ab54e7985cb031e5290f933641fc080db548da5d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pwi-0.14.0.tar.gz:

Publisher: publish.yml on michealroberts/pwi

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

File details

Details for the file pwi-0.14.0-py3-none-any.whl.

File metadata

  • Download URL: pwi-0.14.0-py3-none-any.whl
  • Upload date:
  • Size: 30.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pwi-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81fc9dfe2235ab6f9e530831abc36bb274479fe6dae14f82a15f59e6664f81d9
MD5 e636a73d1aa4e91e70766c8cb375fc87
BLAKE2b-256 9bec9c173572e423e2a30d10be8af49ffe49cc65f9a5f7eb542d47c69e2efc34

See more details on using hashes here.

Provenance

The following attestation bundles were made for pwi-0.14.0-py3-none-any.whl:

Publisher: publish.yml on michealroberts/pwi

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