Files
python-kasa/pyproject.toml
Teemu R. 0580eacc3e
Some checks failed
CI / Perform Lint Checks (3.15) (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
CodeQL Checks / Analyze (python) (push) Has been cancelled
Prepare 0.13.0 (#1867)
Adds offline detection for hub children, clearer errors for unsupported
encryption schemes, the TemperatureRecords module and KLAP reliability
fixes, plus many new device fixtures.

[Full
Changelog](https://github.com/python-kasa/python-kasa/compare/0.12.0...0.13.0)

**Implemented enhancements:**

- Add UnsupportedEncryptionError for unsupported encryption schemes
[\#1866](https://github.com/python-kasa/python-kasa/pull/1866)
(@rytilahti)
- Try the account e-mail with the Kasa setup password over KLAP
[\#1840](https://github.com/python-kasa/python-kasa/pull/1840)
(@ZeliardM)
- Detect offline hub children and fail fast on writes to them
[\#1830](https://github.com/python-kasa/python-kasa/pull/1830)
(@rytilahti)
- Extend KL400 ct range to 2500-9000 + add KL400L10(US) fixture
[\#1819](https://github.com/python-kasa/python-kasa/pull/1819)
(@michael-bohr)
- Add TemperatureRecords module
[\#1814](https://github.com/python-kasa/python-kasa/pull/1814) (@o-gent)

**Fixed bugs:**

- Install the package for the readthedocs build
[\#1853](https://github.com/python-kasa/python-kasa/pull/1853)
(@Zedas030)
- Paginate list responses when multi requests are disabled
[\#1838](https://github.com/python-kasa/python-kasa/pull/1838)
(@DevilRange)
- Apply the KLAP response budget to IoT bulbs
[\#1852](https://github.com/python-kasa/python-kasa/pull/1852)
(@ZeliardM)
- Fix CLI echo of non-string output without rich
[\#1846](https://github.com/python-kasa/python-kasa/pull/1846)
(@junkerderprovinz)
- Stop Windows test runs from running out of loopback ports
[\#1839](https://github.com/python-kasa/python-kasa/pull/1839)
(@ZeliardM)
- Split KLAP IoT updates into smaller requests and validate KLAP
responses [\#1829](https://github.com/python-kasa/python-kasa/pull/1829)
(@ZeliardM)
- Keep the session token out of the HTTP client's debug log
[\#1835](https://github.com/python-kasa/python-kasa/pull/1835)
(@ZeliardM)

**Added support for devices:**

- Add EP25(US) hw 2.6 fw 1.4.1 fixture
[\#1841](https://github.com/python-kasa/python-kasa/pull/1841)
(@jake95159)
- Add KE100 EU/UK 2.6.0 fixtures and capture support
[\#1812](https://github.com/python-kasa/python-kasa/pull/1812) (@o-gent)
- Add HS103(US) hw 5.0 fw 1.0.3 fixture
[\#1818](https://github.com/python-kasa/python-kasa/pull/1818)
(@1waterrj)

**Documentation updates:**

- Mark known unsupported firmware versions in the supported device lists
[\#1865](https://github.com/python-kasa/python-kasa/pull/1865)
(@rytilahti)

**Project maintenance:**

- Keep tests from changing logger levels and fixture data for later
tests [\#1844](https://github.com/python-kasa/python-kasa/pull/1844)
(@ZeliardM)
- Lock github action versions using gh-actions-lock
[\#1843](https://github.com/python-kasa/python-kasa/pull/1843)
(@rytilahti)
- Use clearer error message for unsupported encryption types
[\#1831](https://github.com/python-kasa/python-kasa/pull/1831)
(@rytilahti)

**Other changes:**

- Add fixture for RV20 max plus 1.3.0
[\#1721](https://github.com/python-kasa/python-kasa/pull/1721)
(@rytilahti)
- Add P110(EU) and P110M(FR) TPAP fixtures
[\#1861](https://github.com/python-kasa/python-kasa/pull/1861)
(@ZeliardM)
- Add KP125M(US) hw 1.0 fw 1.4.1 and S505D(US) hw 1.0 fw 1.4.0 fixtures
[\#1836](https://github.com/python-kasa/python-kasa/pull/1836)
(@ZeliardM)
- Add HS200(US) hw 1.0 fw 1.2.6 fixture
[\#1820](https://github.com/python-kasa/python-kasa/pull/1820)
(@michael-bohr)
- Add KS230(US) hw 2.0 fw 1.1.4 fixture
[\#1824](https://github.com/python-kasa/python-kasa/pull/1824)
(@michael-bohr)
- Add HS103(US) hw 5.0 fw 1.1.4 fixture
[\#1821](https://github.com/python-kasa/python-kasa/pull/1821)
(@michael-bohr)
- Add HS210(US) hw 3.0 fw 1.1.0 fixture
[\#1823](https://github.com/python-kasa/python-kasa/pull/1823)
(@michael-bohr)
- Add HS200(US) hw 5.0 fw 1.1.2 fixture
[\#1822](https://github.com/python-kasa/python-kasa/pull/1822)
(@michael-bohr)
- Add KP115(US) hw 1.0 fw 1.1.1 fixture
[\#1825](https://github.com/python-kasa/python-kasa/pull/1825)
(@michael-bohr)
- Add EP25(US) hw 2.6 fw 1.0.3 fixture
[\#1826](https://github.com/python-kasa/python-kasa/pull/1826)
(@michael-bohr)
2026-11-28 01:45:50 +01:00

207 lines
4.7 KiB
TOML

[project]
name = "python-kasa"
version = "0.13.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"
# One event loop for the run, not one per test: on Windows each loop opens a
# loopback TCP connection, and thousands of them use up the dynamic ports.
asyncio_default_fixture_loop_scope = "session"
asyncio_default_test_loop_scope = "session"
#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"