https://github.com/fwcd/phare
Asynchronous and ergonomic Python client SDK for a light installation at the University of Kiel
https://github.com/fwcd/phare
client project-lighthouse python sdk
Last synced: 4 months ago
JSON representation
Asynchronous and ergonomic Python client SDK for a light installation at the University of Kiel
- Host: GitHub
- URL: https://github.com/fwcd/phare
- Owner: fwcd
- License: mit
- Created: 2023-12-12T17:48:36.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-10T00:06:58.000Z (almost 2 years ago)
- Last Synced: 2025-10-16T22:53:15.032Z (8 months ago)
- Topics: client, project-lighthouse, python, sdk
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Phare
[](https://pypi.org/project/phare)
[](https://github.com/fwcd/phare/actions/workflows/build.yml)
An asynchronous and ergonomic client library for the Project Lighthouse API.
## Example
```python
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())
```