This project provides a Python API client for interacting with the Kloodnova platform. It includes methods for authentication, retrieving projects and zones, and updating various parameters such as temperature, speed, and status.
- Authentication: Login and token management.
- Data Retrieval: Fetch projects, zones, and detailed zone information.
- Parameter Updates: Update setpoints, fan speeds, and zone statuses.
- Error Handling: Robust error handling and logging for API interactions.
To install the project, clone the repository and install the required dependencies using Poetry:
git clone https://github.com/benbox69/kloodnova-api.git
cd kloodnova-api
poetry installTo use the KloodnovaAPI, create an instance of the class and call its methods:
from src.api.main import KloodnovaAPI
import aiohttp
import asyncio
async def main():
async with aiohttp.ClientSession() as session:
api = KloodnovaAPI(session)
# Login to the API
success = await api.login('your_email@example.com', 'your_password')
if success:
print("Login successful!")
# Fetch projects
projects = await api.get_projects()
print("Projects:", projects)
else:
print("Login failed!")
# Run the main function using an event loop
asyncio.run(main())To run the tests, use the following command:
pytest src/testsMake sure you have the development dependencies installed (e.g., pytest and aioresponses). These are included in the pyproject.toml file.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes and push them to your fork.
- Open a pull request with a detailed description of your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
The source code for this project is hosted on GitHub: Kloodnova API Client
For any questions or support, please contact Benjamin Tollet at dev@tollet.me.
c8328e4 (Initial commit)