Metadata-Version: 2.1 Name: pyevilgenius Version: 2.0.0 Summary: Python module to talk to Evil Genius Labs devices. Home-page: https://github.com/home-assistant-libs/pyevilgenius Author: Paulus Schoutsen Author-email: paulus@paulusschoutsen.nl License: Apache License 2.0 Platform: any Classifier: Intended Audience :: Developers Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Topic :: Software Development :: Libraries :: Python Modules Description-Content-Type: text/markdown License-File: LICENSE Requires-Dist: aiohttp Requires-Dist: async-timeout # pyevilgenius ## Asynchronous library to control devices by Evil Genius Labs Requires Python 3.8+ and uses asyncio and aiohttp. ```python import asyncio from pprint import pprint import aiohttp from pyevilgenius import EvilGeniusDevice HOST = "192.168.1.113" async def main(): async with aiohttp.ClientSession() as session: await run(session) async def run(websession): device = pyevilgenius.EvilGeniusDevice(host, websession) data = await client.get_data() pprint(device.details) await device.set_path_value('power', '1') asyncio.run(main()) ``` ## Testing locally ```bash python3 example.py ``` ## Timeouts Pyevilgenius does not specify any timeouts for any requests. You will need to specify them in your own code. We recommend the `async_timeout` package: ```python import async_timeout with async_timeout.timeout(10): devices = await hub.get_device_list() ``` ## Contribution guidelines Object hierarchy and property/method names should match the Evil Genius Device APIs.