mirror of
https://github.com/python-kasa/python-kasa.git
synced 2026-10-30 08:27:21 +00:00
Some checks failed
Stale / stale (push) Has been cancelled
CI / Perform Lint Checks (3.15) (push) Has been cancelled
CodeQL Checks / Analyze (python) (push) Has been cancelled
CI / Python 3.11 on macos-latest (push) Has been cancelled
CI / Python 3.12 on macos-latest (push) Has been cancelled
CI / Python 3.13 on macos-latest (push) Has been cancelled
CI / Python 3.14 on macos-latest (push) Has been cancelled
CI / Python 3.15 on macos-latest (push) Has been cancelled
CI / Python 3.11 on ubuntu-latest (push) Has been cancelled
CI / Python 3.12 on ubuntu-latest (push) Has been cancelled
CI / Python 3.13 on ubuntu-latest (push) Has been cancelled
CI / Python 3.14 on ubuntu-latest (push) Has been cancelled
CI / Python 3.15 on ubuntu-latest (push) Has been cancelled
CI / Python 3.11 on windows-latest (push) Has been cancelled
CI / Python 3.12 on windows-latest (push) Has been cancelled
CI / Python 3.13 on windows-latest (push) Has been cancelled
CI / Python 3.14 on windows-latest (push) Has been cancelled
CI / Python 3.15 on windows-latest (push) Has been cancelled
## [0.12.0](https://github.com/python-kasa/python-kasa/tree/0.12.0) (2026-10-25) This release include several compatibility fixes (updated accepted SSL ciphers, removal of Homekit from the default update cycle). The new API `Device.supports_module()` provide a way to find out if the device supports some specific module, e.g., HomeKit, without including it in the default update cycle. [Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.11.0.1...0.12.0) **Fixed bugs:** - Keep hub children when the child component list is missing [\#1797](https://github.com/python-kasa/python-kasa/pull/1797) (@Richardtristan) - Strip multi-word rich tags when rich is not installed [\#1807](https://github.com/python-kasa/python-kasa/pull/1807) (@wolfgang-aura) - Add Device.supports_module() and stop querying HomeKit for iot devices [\#1808](https://github.com/python-kasa/python-kasa/pull/1808) (@rytilahti) - Keep multi requests for smartcam devices after a timeout [\#1802](https://github.com/python-kasa/python-kasa/pull/1802) (@hugaraujo) - Consolidate SSL ciphers and use them in SslTransport [\#1798](https://github.com/python-kasa/python-kasa/pull/1798) (@rytilahti) - Raise UnsupportedDeviceError instead of crashing on unknown device types [\#1781](https://github.com/python-kasa/python-kasa/pull/1781) (@GhostCoder6969) **Added support for devices:** - Add TD21(EU) device fixture [\#1786](https://github.com/python-kasa/python-kasa/pull/1786) (@Smugaski) - Add P116M(IN) fixture [\#1795](https://github.com/python-kasa/python-kasa/pull/1795) (@Partha-dev01) **Project maintenance:** - Add Python 3.15 to supported versions and update pins [\#1793](https://github.com/python-kasa/python-kasa/pull/1793) (@rytilahti) - Generate the changelog with git-cliff and draft releases in CI [\#1809](https://github.com/python-kasa/python-kasa/pull/1809) (@rytilahti) - Build and check packages in CI and publish workflows [\#1782](https://github.com/python-kasa/python-kasa/pull/1782) (@rytilahti) **Other changes:** - Use the real discovery reply in the TD21 fixture [\#1800](https://github.com/python-kasa/python-kasa/pull/1800) (@Smugaski)
204 lines
4.5 KiB
TOML
204 lines
4.5 KiB
TOML
[project]
|
|
name = "python-kasa"
|
|
version = "0.12.0"
|
|
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.11,<4.0"
|
|
dependencies = [
|
|
"asyncclick>=8.1.7",
|
|
"cryptography>=1.9",
|
|
"aiohttp>=3",
|
|
"tzdata>=2024.2 ; platform_system == 'Windows'",
|
|
"mashumaro>=3.20"
|
|
]
|
|
|
|
classifiers = [
|
|
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
|
|
"Operating System :: OS Independent",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
"Programming Language :: Python :: 3.14",
|
|
"Programming Language :: Python :: 3.15",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
speedups = ["orjson>=3.11.1", "kasa-crypt>=0.2.0"]
|
|
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"
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"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",
|
|
"ruff>=0.9.0",
|
|
"uv>=0.11.26",
|
|
]
|
|
docs = [
|
|
"sphinx_rtd_theme~=2.0",
|
|
"sphinxcontrib-programoutput~=0.0",
|
|
"myst-parser",
|
|
"docutils>=0.17",
|
|
"sphinx>=7.4.7",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling>=1.27"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.sdist]
|
|
include = [
|
|
"/kasa",
|
|
"/devtools",
|
|
"/docs",
|
|
"/tests",
|
|
"/CHANGELOG.md",
|
|
]
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
include = [
|
|
"/kasa",
|
|
]
|
|
|
|
[tool.coverage.run]
|
|
source = ["kasa"]
|
|
branch = true
|
|
|
|
[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]
|
|
testpaths = [
|
|
"tests",
|
|
"devtools/release.py",
|
|
]
|
|
markers = [
|
|
"requires_dummy: test requires dummy data to pass, skipped on real devices",
|
|
]
|
|
asyncio_mode = "auto"
|
|
asyncio_default_fixture_loop_scope = "function"
|
|
#timeout = 10
|
|
# dist=loadgroup enables grouping of tests into single worker.
|
|
# required as caplog doesn't play nicely with multiple workers.
|
|
addopts = "--disable-socket --allow-unix-socket --dist=loadgroup"
|
|
|
|
[tool.doc8]
|
|
paths = ["docs"]
|
|
ignore = ["D001"]
|
|
ignore-path-errors = ["docs/source/index.rst;D000"]
|
|
|
|
|
|
[tool.ruff]
|
|
target-version = "py311"
|
|
|
|
[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
|
|
"ANN", # annotations
|
|
]
|
|
ignore = [
|
|
"D105", # Missing docstring in magic method
|
|
"D107", # Missing docstring in `__init__`
|
|
"ANN003", # Missing type annotation for `**kwargs`
|
|
"ANN401", # allow any
|
|
]
|
|
|
|
[tool.ruff.lint.pydocstyle]
|
|
convention = "pep257"
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"tests/*.py" = [
|
|
"D100",
|
|
"D101",
|
|
"D102",
|
|
"D103",
|
|
"D104",
|
|
"S101", # allow asserts
|
|
"E501", # ignore line-too-longs
|
|
"ANN", # skip for now
|
|
]
|
|
"docs/source/conf.py" = [
|
|
"D100",
|
|
"D103",
|
|
]
|
|
# Temporary ANN disable
|
|
"kasa/cli/*.py" = [
|
|
"ANN",
|
|
]
|
|
# Temporary ANN disable
|
|
"devtools/*.py" = [
|
|
"ANN",
|
|
]
|
|
# The tests are at the end of the file
|
|
"devtools/release.py" = [
|
|
"S101",
|
|
]
|
|
|
|
|
|
[tool.mypy]
|
|
warn_unused_configs = true # warns if overrides sections unused/mis-spelled
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = [ "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"
|