python-kasa/kasa/credentials.py
sdb9696 7bb4a456a2
Add plumbing for passing credentials to devices (#507)
* Add plumbing for passing credentials as far as discovery

* Pass credentials to Smart devices

* Rename authentication exception

* Fix tests failure due to test_json_output leaving echo as nop

* Fix test_credentials test

* Do not print credentials, fix echo function bug and improve get type parameter

* Add device class constructor test

* Add comment for echo handling and move assignment
2023-09-13 15:46:38 +02:00

13 lines
319 B
Python

"""Credentials class for username / passwords."""
from dataclasses import dataclass, field
from typing import Optional
@dataclass
class Credentials:
"""Credentials for authentication."""
username: Optional[str] = field(default=None, repr=False)
password: Optional[str] = field(default=None, repr=False)