Skip to content

benbox69/kloodnova-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kloodnova API Client

Description

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.

Features

  • 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.

Installation

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 install

Usage

To 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())

Testing

To run the tests, use the following command:

pytest src/tests

Make sure you have the development dependencies installed (e.g., pytest and aioresponses). These are included in the pyproject.toml file.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

Steps to Contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Commit your changes and push them to your fork.
  4. Open a pull request with a detailed description of your changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Repository

The source code for this project is hosted on GitHub: Kloodnova API Client

Contact

For any questions or support, please contact Benjamin Tollet at dev@tollet.me.

c8328e4 (Initial commit)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages