Skip to main content

Asynchronous and ergonomic Project Lighthouse client library

Project description

Phare

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.1.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

phare-0.0.1-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for phare-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0463a23b94f35f913434c27ab0ba2c87687c288af80646d720f779c5c1ddd7b5
MD5 b2aab35b8be5815ba8cdae5a727d47b1
BLAKE2b-256 49d86a47104997d9f200f0688ad6f059ab15d2d216c9fa75de4bf77b1c1e1ea8

See more details on using hashes here.

File details

Details for the file phare-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: phare-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for phare-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 10e8ea6cb3f5d89bb0831895bee8bf15ad3b65adadc6b6f29c25e7cfafd60cbe
MD5 4e7f58dc3d4345100e05bd881e685b76
BLAKE2b-256 1de1baca6aa1df3304adbbebbc81afae1506c71f80a6e4aa8c5a8e05b2a5ecc0

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