Python client to communicate with FarSounder's ARGOS sensors
Project description
SDK Client for live FarSounder data
Python client to communicate with SonaSoft via API.
Usage
Clone locally and install (uv add .) or install from pypi like:
uv add farsounder
(or use pip, etc)
Then - for example to subscribe to TargetData messages:
import asyncio
from farsounder import config, requests, subscriber
from farsounder.proto import nav_api_pb2
async def main() -> None:
cfg = config.build_config(
host="127.0.0.1",
subscribe=["TargetData"],
)
sub = subscriber.subscribe(config)
def on_targets(message: nav_api_pb2.TargetData) -> None:
print("Got a TargetData!")
print("Targets:", len(message.groups))
# Pub/Sub
sub.on("TargetData", on_targets)
await sub.start()
# Req/rep
settings = await requests.get_processor_settings(config)
print(settings)
# History data
history = await requests.get_history_data(
config,
latitude=41.7223,
longitude=-71.35,
radius_meters=500,
)
print(history.gridded_bottom_detections)
await asyncio.sleep(1.0)
await sub.stop()
if __name__ == "__main__":
asyncio.run(main())
Simulated backend
You can run a local simulated backend that publishes dummy messages and responds to request/reply calls:
uv run examples/simulated_backend.py
Note: the examples/ directory is not installed with uv add farsounder.
Clone the repo to run the examples locally.
Development
Re-generate Protobuf stubs
Protobuf sources live in proto/. Generate Python stubs with:
uv run --group dev gen-protos
Or:
uv run tools/gen_protos.py
Tests
Run tests with:
uv run --group dev pytest
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file farsounder-0.1.0.tar.gz.
File metadata
- Download URL: farsounder-0.1.0.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e78063591ebefb353d2d56ab8c7b8229d54a99afca38e4c2349577fac17c863
|
|
| MD5 |
dd4b33fb801b3bb9e35c521cb2777259
|
|
| BLAKE2b-256 |
8ecd37e7d57bdfad3f93bd6dfdb78af129987aaa19e0acffcf35efa4325aae3a
|
File details
Details for the file farsounder-0.1.0-py3-none-any.whl.
File metadata
- Download URL: farsounder-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
503ad1a6c2e85d382528cc77cdb44d4a463f45a5ca855a249cb6730b393d315a
|
|
| MD5 |
395ca409d987a77fb31fcc976c79e3bc
|
|
| BLAKE2b-256 |
ec32d39016d405947e187e094d73818e219cd014ce18420569a78df99ce6f81a
|