File: run.py

package info (click to toggle)
aiohttp-asyncmdnsresolver 0.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 364 kB
  • sloc: python: 778; makefile: 229; sh: 5
file content (16 lines) | stat: -rw-r--r-- 404 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import asyncio

import aiohttp

from aiohttp_asyncmdnsresolver.api import AsyncMDNSResolver


async def main():
    resolver = AsyncMDNSResolver()
    connector = aiohttp.TCPConnector(resolver=resolver)
    async with aiohttp.ClientSession(connector=connector) as session:
        async with session.get("http://KNKSADE41945.local.") as response:
            print(response.status)


asyncio.run(main())