Skip to main content

Python: Async IO Modern Forms API Client

GitHub Workflow Status Codecov License: MIT PyPI

Asynchronous Python client for Modern Forms Fans.

About

This package allows you to control and monitor Modern Forms fans programmatically. It is mainly created to allow third-party programs to automate the behavior of the Modern Forms fans

Installation

pip install aiomodernforms

Usage

"""Asynchronous Python client for Async IO Modern Forms fan."""
import asyncio
from datetime import datetime, timedelta

import aiomodernforms
from aiomodernforms.const import LIGHT_POWER_ON


async def main():
    """Turn on the fan light."""
    async with aiomodernforms.ModernFormsDevice("192.168.3.197") as fan:
        await fan.update()
        print(fan.status)
        await fan.light(
            on=LIGHT_POWER_ON,
            brightness=50,
            sleep=datetime.now() + timedelta(minutes=2),
        )
        print(fan.status)


if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())

Download files

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

Source Distribution

aiomodernforms-0.1.9.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiomodernforms-0.1.9-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file aiomodernforms-0.1.9.tar.gz.

File metadata

  • Download URL: aiomodernforms-0.1.9.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for aiomodernforms-0.1.9.tar.gz
Algorithm Hash digest
SHA256 95ca7ef25cf6b38c4a02c7eab4638335fa00605c4eee7fe3518110a4f1d5e456
MD5 4711c29a65e3fbf408c917c7865f095c
BLAKE2b-256 df388a906a7f2038b207880789c4d5c7134f9a3d570e0ca7966234b6504eace3

See more details on using hashes here.

File details

Details for the file aiomodernforms-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: aiomodernforms-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for aiomodernforms-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 54e600aa0ad37ea1959e3ba9a2f62d338f6802910aaf8391d639ef45470ff74c
MD5 c5cbbeafeddc7800067af24ad191248d
BLAKE2b-256 09497d1052151423a4e5113513f60c77b71eb3078d8715b56a51d78b4fecb59a

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.9 This release

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page