hoplynk
Official Python SDK for the Hoplynk API.
Stream live GPS and telemetry from Starlink-connected vehicles — no direct network access to the vehicle required.
Install
pip install hoplynk
Quickstart
import os
from hoplynk import HoplynkClient
client = HoplynkClient(api_key=os.environ["HOPLYNK_API_KEY"])
Get an API key from the Hoplynk dashboard. Keys are prefixed hlk_.
REST API
List assets in a kit
assets = client.get_assets(kit_id)
for asset in assets:
print(asset["id"], asset["name"], asset["type"])
Get latest GPS fix
loc = client.get_location(kit_id, asset_id)
if loc:
print(loc.lat, loc.lon, loc.source) # e.g. 'starlink'
print("stale:", loc.stale)
Get full telemetry snapshot
snap = client.get_telemetry(kit_id, asset_id)
if snap.gps:
print(snap.gps.lat, snap.gps.lon)
if snap.status:
print(snap.status.downlink_mbps, "Mbps down")
Get Starlink link status
status = client.get_status(kit_id, asset_id)
if status:
print(f"downlink: {status.downlink_mbps} Mbps")
print(f"latency: {status.pop_ping_latency_ms} ms")
if status.alerts:
print("alerts:", status.alerts)
WebSocket streaming
For live updates without polling:
with client.stream(kit_id, asset_id, feeds=["gps", "status"]) as stream:
for event in stream:
if event["feed"] == "gps":
p = event["payload"]
print(f"GPS {p['lat']:.6f}, {p['lon']:.6f} source={p['source']}")
elif event["feed"] == "status":
p = event["payload"]
print(f"Link {p.get('downlink_mbps')} Mbps ↓ {p.get('uplink_mbps')} Mbps ↑")
The stream auto-reconnects on disconnect. Exits the with block only when you call stream.close() or break out of the loop.
Without context manager
stream = client.stream(kit_id, asset_id)
for event in stream:
process(event)
if done:
stream.close()
break
Context manager for the client
with HoplynkClient(api_key=os.environ["HOPLYNK_API_KEY"]) as client:
loc = client.get_location(kit_id, asset_id)
print(loc.lat, loc.lon)
Types
GpsPayload
| Field | Type | Description |
|---|---|---|
lat |
float |
Latitude (degrees) |
lon |
float |
Longitude (degrees) |
alt_m |
float | None |
Altitude (meters, WGS-84) |
accuracy_m |
float | None |
Horizontal accuracy (meters) |
source |
str |
'starlink' / 'starlink_cached' / 'cellular' / 'manual' |
stale |
bool |
True if GPS fix is older than 30s |
timestamp |
str | None |
ISO 8601 UTC |
StatusPayload
| Field | Type | Description |
|---|---|---|
downlink_mbps |
float | None |
Download throughput |
uplink_mbps |
float | None |
Upload throughput |
pop_ping_latency_ms |
float | None |
Latency to Starlink POP |
pop_ping_drop_rate |
float | None |
Packet drop rate (0–1) |
obstruction_pct |
float | None |
Sky obstruction percentage |
alerts |
list[str] |
Active Starlink alerts |
Environment variables
| Variable | Description |
|---|---|
HOPLYNK_API_KEY |
Your hlk_* API key |
IDs
You'll need a Kit ID and Asset ID for each vehicle. Find them in the Hoplynk dashboard, or call client.get_assets(kit_id) to discover them programmatically.
License
MIT
Metadata
Release files for hoplynk 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hoplynk-0.2.1.tar.gz | 7.3 kB | Without provenance | Details for hoplynk-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hoplynk-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for hoplynk-0.2.1-py3-none-any.whl |
Total release size: 16.1 kB
Release files / hoplynk-0.2.1.tar.gz
| Download URL | hoplynk-0.2.1.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f8fc9801bade7c4dada118800c67041e5d0bcc49ec1a56d3f67da568abcd967
|
|
BLAKE2b-256 checksum How to use checksums |
48163f62c9c75c5a555375163b1ac4993c720d380ecf933ab96e8420d8b0f5de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / hoplynk-0.2.1-py3-none-any.whl
| Download URL | hoplynk-0.2.1-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bdb05a607024d7c9e29f459cb18a8ad2ee597235eb45876df478280dadec95d7
|
|
BLAKE2b-256 checksum How to use checksums |
97290726f4c04f5a2a1016203044f6b4c602fabd41df8173ab5fc5e2c716aa55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for hoplynk 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.