Skip to main content

Python interface for the Agiltron SelfAlign fiber switch

Project description

Agiltron-SelfAlign

Python versions on PyPI agiltron-selfalign version on PyPI

Python interface for the Agiltron SelfAlign fiber switch.

Requires Python 3.11 or newer.

Install

uv add agiltron-selfalign

Or install directly from source:

uv add git+https://github.com/ograsdijk/Agiltron-SelfAlign.git

Code Example

from agiltron_selfalign import AgiltronSelfAlign

resource_name = "COM8"
switch = AgiltronSelfAlign(resource_name, number_of_ports=16)

# change port to port 14
switch.set_fiber_port(14)

# home switch to port 1
switch.home()

Context Manager Example

from agiltron_selfalign import AgiltronSelfAlign

resource_name = "COM8"

with AgiltronSelfAlign(resource_name, number_of_ports=16) as switch:
		switch.set_fiber_port(14)
		switch.home()

API

  • AgiltronSelfAlign(resource_name, timeout=2.0, number_of_ports=16, baudrate=9600, write_timeout=None, inter_byte_timeout=None)
    • Opens the serial connection to the switch.
    • write_timeout=None defaults to the read timeout value.
  • set_fiber_port(fiber_port)
    • Switches to the requested fiber port and validates the acknowledgement frame.
  • home()
    • Sends the home command to move the switch to port 1.
  • close()
    • Closes the serial connection.
  • AgiltronSelfAlignError
    • Raised for serial communication failures and protocol response errors.

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

agiltron_selfalign-0.2.0.tar.gz (40.9 kB view details)

Uploaded Source

Built Distribution

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

agiltron_selfalign-0.2.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file agiltron_selfalign-0.2.0.tar.gz.

File metadata

  • Download URL: agiltron_selfalign-0.2.0.tar.gz
  • Upload date:
  • Size: 40.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for agiltron_selfalign-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0289048f0d1d0295d22620d3721a31583cb79fed3ff24905515e9f864520e147
MD5 911da598b0d3a8358884d1bab5b37441
BLAKE2b-256 fddc63b7e3b5c391b4e33c39b6b35327253d64709926264cd12013250b9312b1

See more details on using hashes here.

File details

Details for the file agiltron_selfalign-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: agiltron_selfalign-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for agiltron_selfalign-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 87a0c128648b96f1d74cd81b2af4e21b2e0cde2c5bac365e3a2cbed12511ef14
MD5 569c7f44842b60c5f6fbf778847f2bd0
BLAKE2b-256 e9b98f38d0b0b7509ddab9839ddde1bc9137ee2ff3485b51172416f30efea72d

See more details on using hashes here.

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