-
-
Notifications
You must be signed in to change notification settings - Fork 0
Initialization & Authentication
github-actions[bot] edited this page Jul 14, 2026
·
5 revisions
🇬🇧 English | 🇩🇪 Deutsch | 🏠
To start, you need an aiohttp.ClientSession and your controller's credentials.
import asyncio
import aiohttp
from violet_poolcontroller_api import VioletPoolAPI, VioletPoolAPIError
async def main():
async with aiohttp.ClientSession() as session:
api = VioletPoolAPI(
host="192.168.1.100",
username="admin", # Optional, depending on controller settings
password="your_password",# Optional
session=session,
use_ssl=False, # Set to True if you use HTTPS
verify_ssl=True,
timeout=10, # Request timeout in seconds
max_retries=3,
dosing_standalone=False, # Set to True for dosing-only standalone setups
rate_limiter=None, # Optional explicitly shared RateLimiter
)
# Now you can call api methods...Each client receives its own rate limiter by default. Pass the same RateLimiter
instance to multiple clients only when they should intentionally share one request budget.