Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Simplify instance creation API #927

Closed
@rytilahti

Description

@rytilahti

Instead of requiring to import Credentials from the kasa package, we should allow creating instances without it.
@sdb9696 suggested to allow passing the username and the password as kwargs, which sounds like a good idea:

from kasa import Discover

dev = Discover.discover_single("127.0.0.1", username="foo", password="bar")
devs = Discover.discover(target="192.168.0.255", username="foo", password="bar")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions