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.5.0.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

milasdk-0.5.0-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file milasdk-0.5.0.tar.gz.

File metadata

  • Download URL: milasdk-0.5.0.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for milasdk-0.5.0.tar.gz
Algorithm Hash digest
SHA256 255f51989f0be081ff06e38d7c74034283bc0ccdd36bcbb83bf73deba226cee5
MD5 e821496233961ee5fa7cf3b872c88149
BLAKE2b-256 e0e4e79f3fd01726bf8c38b6d9f17051d6ac7c5842655938fb860b3f4abb1d2b

See more details on using hashes here.

File details

Details for the file milasdk-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: milasdk-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for milasdk-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5886d32026454d0e7960fba25c20bcd6b1b093d8661807b5bdc7220115a6a16f
MD5 88fddd692bd630e6cd3baee00a88d44d
BLAKE2b-256 19c29d1ba1028fed4fb5612f0a02734b8390df1616bbec864ea5005126a86f91

See more details on using hashes here.

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