Sonar SDK
Python API Client for Sonar (Constellix) API.
Installation
From repository root:
pip install -e .
Usage
from sonar_sdk import SonarClient
# Create a client
client = SonarClient(api_key="your-api-key", secret_key="your-secret-key")
# System operations
sites = client.system.sites()
# DNS check operations
# Get all DNS checks
all_dns_checks = client.checks.dns.get_all()
# Get a specific DNS check
dns_check = client.checks.dns.get(dnsv2_check_id=123)
# Create a DNS check
new_check = client.checks.dns.create(
name="My DNS Check",
fqdn="example.com",
record_type="A"
)
# Delete a DNS check
client.checks.dns.delete(dnsv2_check_id=123)
# Get version information
version_info = client.version()
# Modify connection settings
client.connection.set_timeout(30) # Increase timeout to 30 seconds
client.connection.set_retry_settings(max_retries=5, retry_delay=2) # Update retry settings
# Clean up
client.close_session()
License
MIT
Release files for sonar-sdk 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sonar_sdk-0.1.0.tar.gz | 8.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sonar_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.8 kB
Release files / sonar_sdk-0.1.0.tar.gz
| Download URL | sonar_sdk-0.1.0.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
872c6791e527dee37a76518c6d83d7074744853a435d7d692ccc8b12d568694a
|
|
BLAKE2b-256 checksum How to use checksums |
d0276681e9c688cac54d1fa69f3a6f15f2726c89a0aa5311ce0b7fce74a119dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / sonar_sdk-0.1.0-py3-none-any.whl
| Download URL | sonar_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ad90147ccbb8ab477cac524915da8e9e0bab38d74a398205193fd48eed1d01f9
|
|
BLAKE2b-256 checksum How to use checksums |
d6730ac3d97a118eba5b425025b29f6f1ac64321a4020dfd1b6504cb2ef2f8a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|