Skip to main content

Client for Bliss API

Project description

blissclient

A python client for blissterm, the high-level client is fully typed ready for auto-completion in any modern IDE.

Getting Started

Set the BLISSTERM_URL

export BLISSTERM_URL=http://localhost:5000

Then:

from blissclient import BlissClient

client = BlissClient()

omega = client.hardware.get("omega")
print(omega.position)

omega.move(100)
omega.wait()

Execute calls in the session:

from blissclient import BlissClient


client = BlissClient()
test_session = client.session("test_session")

# Blocking until the call terminates
return_value =test_session.call("ascan", "$omega", 0, 10, 10, 0.1, "$diode")

Strings prefixed with $ are translated to the relevant beacon objects

Or execute asynchronously:

import time
from blissclient import BlissClient

client = BlissClient()

test_session = client.session("test_session")
call_id = test_session.call("ascan", "$omega", 0, 10, 10, 0.1, "$diode", call_async=True)

while True:
    response = test_session.state(call_id=call_id)
    if response.state == "terminated":
        break
    else:
        time.sleep(1)

    print(response.return_value)

    # The redis scan key, can be used with `blissdata``
    response.return_value["key"]

See the test suite for more examples.

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

blissclient-0.2.2.tar.gz (13.2 kB view details)

Uploaded Source

File details

Details for the file blissclient-0.2.2.tar.gz.

File metadata

  • Download URL: blissclient-0.2.2.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for blissclient-0.2.2.tar.gz
Algorithm Hash digest
SHA256 9db298a2d75632c11737b63e7a731697d931ab057fcc683e0327584a329eb48f
MD5 a72cab62d84c4cd01fd0a482e85b1aee
BLAKE2b-256 dff69536a82a298c8f82195f84df852884f3e953b9b4dd697995f7465a7ec5f8

See more details on using hashes here.

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