How to use the pytile.tile.Tile function in pytile

To help you get started, we’ve selected a few pytile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bachya / pytile / pytile / client.py View on Github external
"locale": self._locale,
                },
            )
            self._client_established = True

        resp: dict = await self._request(
            "post",
            f"clients/{self.client_uuid}/sessions",
            data={"email": self._email, "password": self._password},
        )

        if not self.user_uuid:
            self.user_uuid = resp["result"]["user"]["user_uuid"]
        self._session_expiry = resp["result"]["session_expiration_timestamp"]

        self.tiles = Tile(self._request, user_uuid=self.user_uuid)
github bachya / pytile / pytile / client.py View on Github external
self,
        email: str,
        password: str,
        *,
        session: Optional[ClientSession] = None,
        client_uuid: Optional[str] = None,
        locale: str = DEFAULT_LOCALE,
    ) -> None:
        """Initialize."""
        self._client_established: bool = False
        self._email: str = email
        self._locale: str = locale
        self._password: str = password
        self._session: ClientSession = session
        self._session_expiry: Optional[int] = None
        self.tiles: Optional[Tile] = None
        self.user_uuid: Optional[str] = None

        self.client_uuid: str
        if not client_uuid:
            self.client_uuid = str(uuid4())
        else:
            self.client_uuid = client_uuid

pytile

A simple Python API for Tile® Bluetooth trackers

MIT
Latest version published 12 months ago

Package Health Score

65 / 100
Full package analysis

Similar packages