Asynchronous and ergonomic Project Lighthouse client library
Project description
Phare
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
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
phare-0.0.1-py3-none-any.whl
(14.6 kB
view hashes)