mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 11:13:34 +00:00
530cf4b523
## [0.7.6](https://github.com/python-kasa/python-kasa/tree/0.7.6) (2024-10-29) [Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.5...0.7.6) **Release summary:** - Experimental support for Tapo cameras and the Tapo H200 hub which uses the same protocol. - Better timestamp support across all devices. - Support for new devices P304M, S200D and S200B (see README.md for note on the S200 support). - Various other fixes and minor features. **Implemented enhancements:** - Add support for setting the timezone [\#436](https://github.com/python-kasa/python-kasa/issues/436) - Add stream\_rtsp\_url to camera module [\#1197](https://github.com/python-kasa/python-kasa/pull/1197) (@sdb9696) - Try default logon credentials in SslAesTransport [\#1195](https://github.com/python-kasa/python-kasa/pull/1195) (@sdb9696) - Allow enabling experimental devices from environment variable [\#1194](https://github.com/python-kasa/python-kasa/pull/1194) (@sdb9696) - Add core device, child and camera modules to smartcamera [\#1193](https://github.com/python-kasa/python-kasa/pull/1193) (@sdb9696) - Fallback to get\_current\_power if get\_energy\_usage does not provide current\_power [\#1186](https://github.com/python-kasa/python-kasa/pull/1186) (@Fulch36) - Add https parameter to device class factory [\#1184](https://github.com/python-kasa/python-kasa/pull/1184) (@sdb9696) - Add discovery list command to cli [\#1183](https://github.com/python-kasa/python-kasa/pull/1183) (@sdb9696) - Add Time module to SmartCamera devices [\#1182](https://github.com/python-kasa/python-kasa/pull/1182) (@sdb9696) - Add try\_connect\_all to allow initialisation without udp broadcast [\#1171](https://github.com/python-kasa/python-kasa/pull/1171) (@sdb9696) - Update dump\_devinfo for smart camera protocol [\#1169](https://github.com/python-kasa/python-kasa/pull/1169) (@sdb9696) - Enable newer encrypted discovery protocol [\#1168](https://github.com/python-kasa/python-kasa/pull/1168) (@sdb9696) - Initial TapoCamera support [\#1165](https://github.com/python-kasa/python-kasa/pull/1165) (@sdb9696) - Add waterleak alert timestamp [\#1162](https://github.com/python-kasa/python-kasa/pull/1162) (@rytilahti) - Create common Time module and add time set cli command [\#1157](https://github.com/python-kasa/python-kasa/pull/1157) (@sdb9696) **Fixed bugs:** - Only send 20002 discovery request with key included [\#1207](https://github.com/python-kasa/python-kasa/pull/1207) (@sdb9696) - Fix SslAesTransport default login and add tests [\#1202](https://github.com/python-kasa/python-kasa/pull/1202) (@sdb9696) - Fix device\_config serialisation of https value [\#1196](https://github.com/python-kasa/python-kasa/pull/1196) (@sdb9696) **Added support for devices:** - Add S200B\(EU\) fw 1.11.0 fixture [\#1205](https://github.com/python-kasa/python-kasa/pull/1205) (@sdb9696) - Add TC65 fixture [\#1200](https://github.com/python-kasa/python-kasa/pull/1200) (@rytilahti) - Add P304M\(UK\) test fixture [\#1185](https://github.com/python-kasa/python-kasa/pull/1185) (@Fulch36) - Add H200 experimental fixture [\#1180](https://github.com/python-kasa/python-kasa/pull/1180) (@sdb9696) - Add S200D button fixtures [\#1161](https://github.com/python-kasa/python-kasa/pull/1161) (@rytilahti) **Project maintenance:** - Fix mypy errors in parse_pcap_klap [\#1214](https://github.com/python-kasa/python-kasa/pull/1214) (@sdb9696) - Make HSV NamedTuple creation more efficient [\#1211](https://github.com/python-kasa/python-kasa/pull/1211) (@sdb9696) - dump\_devinfo: query get\_current\_brt for iot dimmers [\#1209](https://github.com/python-kasa/python-kasa/pull/1209) (@rytilahti) - Add trigger\_logs and double\_click to dump\_devinfo helper [\#1208](https://github.com/python-kasa/python-kasa/pull/1208) (@sdb9696) - Fix smartcamera childdevice module [\#1206](https://github.com/python-kasa/python-kasa/pull/1206) (@sdb9696) - Add H200\(EU\) fw 1.3.2 fixture [\#1204](https://github.com/python-kasa/python-kasa/pull/1204) (@sdb9696) - Do not pass None as timeout to http requests [\#1203](https://github.com/python-kasa/python-kasa/pull/1203) (@sdb9696) - Update SMART test framework to use fake child protocols [\#1199](https://github.com/python-kasa/python-kasa/pull/1199) (@sdb9696) - Allow passing an aiohttp client session during discover try\_connect\_all [\#1198](https://github.com/python-kasa/python-kasa/pull/1198) (@sdb9696) - Add test framework for smartcamera [\#1192](https://github.com/python-kasa/python-kasa/pull/1192) (@sdb9696) - Rename experimental fixtures folder to smartcamera [\#1191](https://github.com/python-kasa/python-kasa/pull/1191) (@sdb9696) - Combine smartcamera error codes into SmartErrorCode [\#1190](https://github.com/python-kasa/python-kasa/pull/1190) (@sdb9696) - Allow deriving from SmartModule without being registered [\#1189](https://github.com/python-kasa/python-kasa/pull/1189) (@sdb9696) - Improve supported module checks for hub children [\#1188](https://github.com/python-kasa/python-kasa/pull/1188) (@sdb9696) - Update smartcamera to support single get/set/do requests [\#1187](https://github.com/python-kasa/python-kasa/pull/1187) (@sdb9696) - Add S200B\(US\) fw 1.12.0 fixture [\#1181](https://github.com/python-kasa/python-kasa/pull/1181) (@sdb9696) - Add T110\(US\), T310\(US\) and T315\(US\) sensor fixtures [\#1179](https://github.com/python-kasa/python-kasa/pull/1179) (@sdb9696) - Enforce EOLs for \*.rst and \*.md [\#1178](https://github.com/python-kasa/python-kasa/pull/1178) (@rytilahti) - Convert fixtures to use unix newlines [\#1177](https://github.com/python-kasa/python-kasa/pull/1177) (@rytilahti) - Add motion sensor to known categories [\#1176](https://github.com/python-kasa/python-kasa/pull/1176) (@rytilahti) - Drop urllib3 dependency and create ssl context in executor thread [\#1175](https://github.com/python-kasa/python-kasa/pull/1175) (@sdb9696) - Expose smart child device map as a class constant [\#1173](https://github.com/python-kasa/python-kasa/pull/1173) (@sdb9696)
182 lines
4.1 KiB
TOML
182 lines
4.1 KiB
TOML
[project]
|
|
name = "python-kasa"
|
|
version = "0.7.6"
|
|
description = "Python API for TP-Link Kasa and Tapo devices"
|
|
license = {text = "GPL-3.0-or-later"}
|
|
authors = [ { name = "python-kasa developers" }]
|
|
readme = "README.md"
|
|
requires-python = ">=3.9,<4.0"
|
|
dependencies = [
|
|
"asyncclick>=8.1.7",
|
|
"pydantic>=1.10.15",
|
|
"cryptography>=1.9",
|
|
"async-timeout>=3.0.0",
|
|
"aiohttp>=3",
|
|
"typing-extensions>=4.12.2,<5.0",
|
|
"tzdata>=2024.2 ; platform_system == 'Windows'",
|
|
]
|
|
|
|
classifiers = [
|
|
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
|
|
"Operating System :: OS Independent",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
speedups = ["orjson>=3.9.1", "kasa-crypt>=0.2.0"]
|
|
docs = ["sphinx~=5.0", "sphinx_rtd_theme~=2.0", "sphinxcontrib-programoutput~=0.0", "myst-parser", "docutils>=0.17"]
|
|
shell = ["ptpython", "rich"]
|
|
|
|
[project.urls]
|
|
"Homepage" = "https://github.com/python-kasa/python-kasa"
|
|
"Bug Tracker" = "https://github.com/python-kasa/python-kasa/issues"
|
|
"Documentation" = "https://python-kasa.readthedocs.io"
|
|
"Repository" = "https://github.com/python-kasa/python-kasa"
|
|
|
|
[project.scripts]
|
|
kasa = "kasa.cli.__main__:cli"
|
|
|
|
[tool.uv]
|
|
dev-dependencies = [
|
|
"pytest",
|
|
"pytest-cov",
|
|
"pytest-asyncio",
|
|
"pytest-sugar",
|
|
"pre-commit",
|
|
"voluptuous",
|
|
"toml",
|
|
"pytest-mock",
|
|
"codecov",
|
|
"xdoctest>=1.2.0",
|
|
"coverage[toml]",
|
|
"pytest-timeout~=2.0",
|
|
"pytest-freezer~=0.4",
|
|
"mypy~=1.0",
|
|
"pytest-xdist>=3.6.1",
|
|
"pytest-socket>=0.7.0",
|
|
]
|
|
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.sdist]
|
|
include = [
|
|
"/kasa",
|
|
"/devtools",
|
|
"/docs",
|
|
"/CHANGELOG.md",
|
|
]
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
include = [
|
|
"/kasa",
|
|
]
|
|
exclude = [
|
|
"/kasa/tests",
|
|
]
|
|
|
|
[tool.coverage.run]
|
|
source = ["kasa"]
|
|
branch = true
|
|
omit = [
|
|
"kasa/tests/*",
|
|
"kasa/experimental/*"
|
|
]
|
|
|
|
[tool.coverage.report]
|
|
exclude_lines = [
|
|
# ignore debug logging
|
|
"if debug_enabled:",
|
|
# Don't complain if tests don't hit defensive assertion code:
|
|
"raise AssertionError",
|
|
"raise NotImplementedError",
|
|
# Don't complain about missing debug-only code:
|
|
"def __repr__",
|
|
# Have to re-enable the standard pragma
|
|
"pragma: no cover",
|
|
# TYPE_CHECKING and @overload blocks are never executed during pytest run
|
|
"if TYPE_CHECKING:",
|
|
"@overload"
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
markers = [
|
|
"requires_dummy: test requires dummy data to pass, skipped on real devices",
|
|
]
|
|
asyncio_mode = "auto"
|
|
asyncio_default_fixture_loop_scope = "function"
|
|
timeout = 10
|
|
addopts = "--disable-socket --allow-unix-socket"
|
|
|
|
[tool.doc8]
|
|
paths = ["docs"]
|
|
ignore = ["D001"]
|
|
ignore-path-errors = ["docs/source/index.rst;D000"]
|
|
|
|
|
|
[tool.ruff]
|
|
target-version = "py38"
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"W", # pycodestyle warnings
|
|
"D", # pydocstyle
|
|
"F", # pyflakes
|
|
"UP", # pyupgrade
|
|
"B", # flake8-bugbear
|
|
"SIM", # flake8-simplify
|
|
"FA", # flake8-future-annotations
|
|
"I", # isort
|
|
"S", # bandit
|
|
"PT", # flake8-pytest-style
|
|
"LOG", # flake8-logging
|
|
"G", # flake8-logging-format
|
|
]
|
|
ignore = [
|
|
"D105", # Missing docstring in magic method
|
|
"D107", # Missing docstring in `__init__`
|
|
]
|
|
|
|
[tool.ruff.lint.pydocstyle]
|
|
convention = "pep257"
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"kasa/tests/*.py" = [
|
|
"D100",
|
|
"D101",
|
|
"D102",
|
|
"D103",
|
|
"D104",
|
|
"S101", # allow asserts
|
|
"E501", # ignore line-too-longs
|
|
]
|
|
"docs/source/conf.py" = [
|
|
"D100",
|
|
"D103",
|
|
]
|
|
|
|
[tool.mypy]
|
|
warn_unused_configs = true # warns if overrides sections unused/mis-spelled
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = [ "kasa.tests.*", "devtools.*" ]
|
|
disable_error_code = "annotation-unchecked"
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = [
|
|
"devtools.bench.benchmark",
|
|
"devtools.parse_pcap",
|
|
"devtools.parse_pcap_klap",
|
|
"devtools.perftest",
|
|
"devtools.create_module_fixtures"
|
|
]
|
|
disable_error_code = "import-not-found,import-untyped"
|