Python API Client for Sonar (Constellix) API
Project description
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
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
sonar_sdk-0.1.0.tar.gz
(8.0 kB
view details)
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 sonar_sdk-0.1.0.tar.gz.
File metadata
- Download URL: sonar_sdk-0.1.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
872c6791e527dee37a76518c6d83d7074744853a435d7d692ccc8b12d568694a
|
|
| MD5 |
61b72f20a7430f9b5bad5542b83e80da
|
|
| BLAKE2b-256 |
d0276681e9c688cac54d1fa69f3a6f15f2726c89a0aa5311ce0b7fce74a119dd
|
File details
Details for the file sonar_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sonar_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad90147ccbb8ab477cac524915da8e9e0bab38d74a398205193fd48eed1d01f9
|
|
| MD5 |
efd704590f71721019b4d82c774a2049
|
|
| BLAKE2b-256 |
d6730ac3d97a118eba5b425025b29f6f1ac64321a4020dfd1b6504cb2ef2f8a7
|