Skip to main content

A request parser to simplify communication with physics-lab devices

Project description

LabAutomation Communication Request Manager

In the context of a physics lab automation project, this package aims to simplify communication with different devices. Communication is based on 0mq and json-based messages. This package is meant to be used in combination with a 0mq-based device server.

Sending a request

The only relevant function to use is ReqParser.request(): Parameters:

  • device: to be addressed device name as string (defined in Device Server)
  • action: requested action as string ("connect", "disconnect", "test", arbitrary)
  • payload: values to be passed for arbitrary action

Returns:

  • status: True (successful) or False (communication request failed)
  • info: string of more detailed information

Including / Replacing Communication Manager

By using the following import line, the package can be used: from la_com_request_parser.com_request_parser import ReqParser

If you previously used the Communication Manager and it is deeply rooted in the project you can just import the following line to maintain full functionality: from la_com_request_parser.com_request_parser import ReqParser as CommunicationManager

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

la_com_request_parser-0.0.2.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

la_com_request_parser-0.0.2-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page