Python SDK for Sonoran CAD and CMS integrations
Project description
Sonoran.py
Sonoran.py is the Python library for Sonoran CAD and Radio integrations.
This repository currently focuses on the CAD and Radio v2 API surfaces and mirrors the public helper names from Sonoran.js.
Install
pip install Sonoran.py
Example Usage
from sonoran import Instance, productEnums
instance = Instance(
apiKey="YOUR_API_KEY",
communityId="YOUR_COMMUNITY_ID",
product=productEnums.CAD,
serverId=1,
)
response = instance.cad.createEmergencyCallV2(
{
"serverId": 1,
"isEmergency": True,
"caller": "John Doe",
"location": "101 Alta Street",
"description": "Structure fire with visible smoke.",
"deleteAfterMinutes": 30,
}
)
if response.success:
print(response.data)
else:
print(response.reason)
location_response = instance.cad.updateUnitLocationsV2(
{
"serverId": 1,
"updates": [
{
"roblox": 123456789,
"location": "Mission Row",
}
],
}
)
with open("bodycam-clip.webm", "rb") as clip:
bodycam_response = instance.cad.uploadBodycamRecordingV2(
{
"accountUuid": "USER_ACCOUNT_UUID",
"durationMs": 90000,
"identId": 123,
"unitNumber": "1A-12",
"unitLocation": "Senora Fwy / Route 68",
"fileName": "bodycam-clip.webm",
"fileContent": clip.read(),
"contentType": "video/webm",
}
)
Notes
- CAD and Radio v2 helpers are included right now.
- Helper names match
Sonoran.js. - Radio v2 clients use
communityIdfor/v2/servers/{communityId}routes androomIdon client creation for room-scoped helpers:
radio = Instance(
apiKey="YOUR_RADIO_API_KEY",
communityId="YOUR_COMMUNITY_ID",
product=productEnums.RADIO,
roomId=2,
)
radio.setRoomId(1)
instance.cad.setStationsV2(...)sendslocations,tones, andunitColorsat the top level of the request body.- Bodycam uploads use
instance.cad.uploadBodycamRecordingV2(...)with multipart form data built by the SDK. - CAD v2 requests automatically retry
429responses up to 2 times and respectRetry-Afterwhen it is provided. - The import package remains
sonoran.
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 sonoran_py-0.1.13.tar.gz.
File metadata
- Download URL: sonoran_py-0.1.13.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
651b4ff57b58a4477e99b4bbe98ac5d4cbde8b40a361657e00f0a1f8c3e1d673
|
|
| MD5 |
327c9e190279702a9e9f59a89b9aed3a
|
|
| BLAKE2b-256 |
b3279768d8e8de38cfd73300da72a7981404256672800b61505023b03011f724
|
Provenance
The following attestation bundles were made for sonoran_py-0.1.13.tar.gz:
Publisher:
release.yml on Sonoran-Software/Sonoran.py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sonoran_py-0.1.13.tar.gz -
Subject digest:
651b4ff57b58a4477e99b4bbe98ac5d4cbde8b40a361657e00f0a1f8c3e1d673 - Sigstore transparency entry: 1513730679
- Sigstore integration time:
-
Permalink:
Sonoran-Software/Sonoran.py@f12842d98e7df9a9461483a7fffde754ca57ddc7 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Sonoran-Software
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f12842d98e7df9a9461483a7fffde754ca57ddc7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sonoran_py-0.1.13-py3-none-any.whl.
File metadata
- Download URL: sonoran_py-0.1.13-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2fa01ea99ea191f0e7d4c8b93f7f763cfa428652639efb7f4b5e1929848cb1a
|
|
| MD5 |
beb0518aec498bac7d1ca87dbf27db86
|
|
| BLAKE2b-256 |
bf2fbeaddf3f8fbac9e8e59856262b351d7b01ab05b38bdb60cdf49d3bc87f11
|
Provenance
The following attestation bundles were made for sonoran_py-0.1.13-py3-none-any.whl:
Publisher:
release.yml on Sonoran-Software/Sonoran.py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sonoran_py-0.1.13-py3-none-any.whl -
Subject digest:
a2fa01ea99ea191f0e7d4c8b93f7f763cfa428652639efb7f4b5e1929848cb1a - Sigstore transparency entry: 1513730778
- Sigstore integration time:
-
Permalink:
Sonoran-Software/Sonoran.py@f12842d98e7df9a9461483a7fffde754ca57ddc7 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Sonoran-Software
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f12842d98e7df9a9461483a7fffde754ca57ddc7 -
Trigger Event:
push
-
Statement type: