Skip to main content

Asynchronous and ergonomic Project Lighthouse client library

Project description

Phare

PyPI Build

An asynchronous and ergonomic client library for the Project Lighthouse API.

Example

import asyncio
import numpy as np
import os

from phare.auth import Auth
from phare.lighthouse import Lighthouse
from phare.constants import LIGHTHOUSE_FRAME_SHAPE, LIGHTHOUSE_URL

async def main():
    user = os.environ['LIGHTHOUSE_USER']
    token = os.environ['LIGHTHOUSE_TOKEN']
    url = os.environ.get('LIGHTHOUSE_URL', LIGHTHOUSE_URL)

    async with await Lighthouse.connect(Auth(user, token), url) as lh:
        frame = np.random.randint(0, 255, size=LIGHTHOUSE_FRAME_SHAPE, dtype=np.uint8)
        await lh.put_model(frame)

asyncio.run(main())

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

phare-0.0.2.tar.gz (5.7 kB view details)

Uploaded Source

File details

Details for the file phare-0.0.2.tar.gz.

File metadata

  • Download URL: phare-0.0.2.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for phare-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e8d7101bb32815ae789505f3a4b42d229f243a0e02a56aef68af5e0d3bdc1f37
MD5 7024b77572d867eb9fe2ce0e7db8f11e
BLAKE2b-256 62bee1c72abe97d372d145faa213962a521477faeaf4a54fb40b866cf2c0443b

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