1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
# pylint: disable=W0621
"""Asynchronous Python client for IPP."""
import asyncio
from pyipp import IPP
async def main() -> None:
"""Show example of connecting to your IPP print server."""
async with IPP("ipps://EPSON761251.local:631/ipp/print") as ipp:
# Get Printer Info
printer = await ipp.printer()
print(printer)
async with IPP("ipp://hp6830.local:631/ipp/print") as ipp:
# Get Printer Info
printer = await ipp.printer()
print(printer)
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
|