Skip to main content

TCP/IP client for communicating with PriarieView

Project description

PyPrLink

A TCP/IP client for communicating with PrairieView. Alternate for PraireLink Application from Python. Python-PrairieLink (PyPrLink)

Installation

pip install pyprlink

Configuration

Create a .env file in your project directory with the following variables:

ADDRESS=your_server_address
PORT=your_port_number
LOG_LEVEL=INFO  # or DEBUG or ERROR

Usage

As a Python Module

from pyprlink.tcp_client import ask_PV

# Send commands to PrairieView
ask_PV('-gmp', 'x')  # Get microscope position
ask_PV('-pg', '3', '400')  # Set page number and value
ask_PV('-x')  # Exit command

From Command Line

After installation, you can use the pyprlink command directly:

# Get help
pyprlink --help

# Send commands
pypr -gmp x
pypr -pg 3 400
pypr -x

Development

Install development dependencies:

pip install -e ".[dev]"

Run tests:

pytest

Examples

Common commands:

  • pypr -gmp x - Get microscope position
  • pypr -pg 3 400 - Set page parameters
  • pypr -x - Exit command

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

pyprlink-0.1.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

pyprlink-0.1.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

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