File: example.py

package info (click to toggle)
aiosteamist 1.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 408 kB
  • sloc: python: 108; makefile: 16; sh: 5
file content (19 lines) | stat: -rw-r--r-- 400 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import asyncio
import pprint

import aiohttp

from aiosteamist import Steamist


async def main():
    websession = aiohttp.ClientSession()
    steamist = Steamist("192.168.210.105", websession)
    devices = await steamist.async_get_status()
    pprint.pprint(devices)
    await websession.close()


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