Skip to main content

Python SDK for Mila Air Purifiers

Project description

milasdk

Python SDK for Mila Air Purifiers. The primary goal is to use this to power integrations for Home Assistant.

Installation

pip install milasdk

Usage

Simple example

async def main():
    logging.basicConfig(level=logging.DEBUG, format='%(asctime)-15s %(levelname)-8s %(message)s')

    #create the authenticated session
    async with DefaultAsyncSession(aiohttp.ClientSession(), USERNAME, PASSWORD) as session:
        api = MilaApi(session)

        while True:
            await update(api)
            await asyncio.sleep(60)

Please see simple_example.py for a full working example of usage of this library.

Objects

MilaAPI

The main client class that handles communications between the client and Mila service using GraphQL

API Overview

The Mila GraphQL schema can be found in mila_schema.gql.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

milasdk-0.4.5.tar.gz (16.8 kB view hashes)

Uploaded Source

Built Distribution

milasdk-0.4.5-py3-none-any.whl (19.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page