File: devices.py

package info (click to toggle)
python-tailscale 0.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 480 kB
  • sloc: python: 269; makefile: 3
file content (20 lines) | stat: -rw-r--r-- 444 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# pylint: disable=W0621
"""Asynchronous client for the Tailscale API."""

import asyncio

from tailscale import Tailscale


async def main() -> None:
    """Show example on using the Tailscale API client."""
    async with Tailscale(
        tailnet="frenck",
        api_key="tskey-somethingsomething",
    ) as tailscale:
        devices = await tailscale.devices()
        print(devices)


if __name__ == "__main__":
    asyncio.run(main())