python-kasa/kasa/credentials.py
Teemu R 30c4e6a6a3
Cleanup credentials handling (#605)
* credentials: don't allow none to simplify checks

* Implement __bool__ for credentials

* Cleanup klaptransport cred usage

* Cleanup deviceconfig and tapodevice

* fix linting

* Pass dummy credentials for tests

* Remove __bool__ dunder and add docs to credentials

* Check for cred noneness in tapodevice.update()
2024-01-03 19:26:52 +01:00

14 lines
357 B
Python

"""Credentials class for username / passwords."""
from dataclasses import dataclass, field
@dataclass
class Credentials:
"""Credentials for authentication."""
#: Username (email address) of the cloud account
username: str = field(default="", repr=False)
#: Password of the cloud account
password: str = field(default="", repr=False)