-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
423 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# kasa-cli | ||
|
||
A command-line application for the TP-Link Kasa Smarthome products (built with nuitka, wraps the python-kasa module). | ||
|
||
## About | ||
|
||
This project is simply a wrapper around the python-kasa python library (and it's cli.py submodule) that is built with nuitka into an executable (single file *.exe on Windows). |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
__version__ = '0.1.0' | ||
import asyncio | ||
from kasa import cli | ||
|
||
if __name__ == "__main__": | ||
|
||
# fixes a "raise RuntimeError('Event loop is closed')" error | ||
# https://stackoverflow.com/questions/45600579/asyncio-event-loop-is-closed-when-getting-loop | ||
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) | ||
|
||
cli.cli() |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[tool.poetry] | ||
name = "kasa-cli" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["Jim Kring <[email protected]>"] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
python-kasa = "^0.5.0" | ||
|
||
[tool.poetry.dev-dependencies] | ||
pytest = "^5.2" | ||
Nuitka = "^0.9.1" | ||
ordered-set = "^4.1.0" | ||
|
||
[build-system] | ||
requires = ["setuptools>=42", "wheel", "nuitka", "toml"] | ||
build-backend = "nuitka.distutils.Build" | ||
|
||
[nuitka] | ||
# These are not recommended, but they make it obvious to have effect. | ||
|
||
# boolean option, e.g. if you cared for C compilation commands, leading | ||
# dashes are omitted | ||
# show-scons = true | ||
|
||
# options with single values, e.g. enable a plugin of Nuitka | ||
# enable-plugin = pyside2 | ||
|
||
# options with several values, e.g. avoiding including modules, accepts | ||
# list argument. | ||
# nofollow-import-to = ["*.tests", "*.distutils"] | ||
|
||
onefile = true | ||
standalone = true |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from kasa_cli import __version__ | ||
|
||
|
||
def test_version(): | ||
assert __version__ == '0.1.0' |