A Python library for loading data from a SpaceX Starlink satellite.
The goal is to be a simple interface for Starlink. It builds upon the work done on starlink-grpc-toolsto connect to Starlink from Python (and I'm also using it to understand gRPC, which I've never used before this).
I'm writing this in order to create a Home Assistant component for Starlink. I'll update the README when I have that started.
I currently have the first iteration of Starlink satellites and am developing with this. Feel free to create an issue if you have a second iteration and want to help add support for this.
The goal is to write an interface that is friendly for users and that abstracts the connection details. For example:
from spacex.starlink import StarlinkDish
def is_my_dish_obstructed() -> bool:
# Using a context manager automatically connects
with StarlinkDish() as dish:
return dish.status.obstructed
Starting with version 0.1.3, if you use asyncio, you can import spacex.starlink.aio.AsyncStarlinkDish
.
This API has not been thoroughly tested, though.
from spacex.starlink.aio import AsyncStarlinkDish
async def is_my_dish_obstructed() -> bool:
async with StarlinkDish() as dish:
await dish.refresh()
return dish.status.obstructed