2024-09-06 14:48:43 +00:00
|
|
|
[project]
|
2020-05-12 10:11:47 +00:00
|
|
|
name = "python-kasa"
|
2024-10-29 18:05:22 +00:00
|
|
|
version = "0.7.6"
|
2024-09-06 14:48:43 +00:00
|
|
|
description = "Python API for TP-Link Kasa and Tapo devices"
|
|
|
|
license = {text = "GPL-3.0-or-later"}
|
|
|
|
authors = [ { name = "python-kasa developers" }]
|
2020-05-12 10:11:47 +00:00
|
|
|
readme = "README.md"
|
2024-09-06 14:48:43 +00:00
|
|
|
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",
|
2024-10-08 07:16:51 +00:00
|
|
|
"tzdata>=2024.2 ; platform_system == 'Windows'",
|
2020-05-12 10:11:47 +00:00
|
|
|
]
|
2024-09-06 14:48:43 +00:00
|
|
|
|
|
|
|
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",
|
2024-01-04 18:14:14 +00:00
|
|
|
]
|
2020-05-12 10:11:47 +00:00
|
|
|
|
2024-09-06 14:48:43 +00:00
|
|
|
[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"
|
2023-02-18 21:09:35 +00:00
|
|
|
"Bug Tracker" = "https://github.com/python-kasa/python-kasa/issues"
|
|
|
|
"Documentation" = "https://python-kasa.readthedocs.io"
|
2024-09-06 14:48:43 +00:00
|
|
|
"Repository" = "https://github.com/python-kasa/python-kasa"
|
2023-02-18 21:09:35 +00:00
|
|
|
|
2024-09-06 14:48:43 +00:00
|
|
|
[project.scripts]
|
2024-07-23 18:13:52 +00:00
|
|
|
kasa = "kasa.cli.__main__:cli"
|
2020-05-12 10:11:47 +00:00
|
|
|
|
2024-09-06 14:48:43 +00:00
|
|
|
[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",
|
2024-09-27 09:27:53 +00:00
|
|
|
"mypy~=1.0",
|
|
|
|
"pytest-xdist>=3.6.1",
|
2024-09-27 16:20:25 +00:00
|
|
|
"pytest-socket>=0.7.0",
|
2024-09-06 14:48:43 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
[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",
|
|
|
|
]
|
2020-06-30 00:29:52 +00:00
|
|
|
|
2020-05-12 10:11:47 +00:00
|
|
|
[tool.coverage.run]
|
|
|
|
source = ["kasa"]
|
|
|
|
branch = true
|
2024-10-16 15:53:52 +00:00
|
|
|
omit = [
|
|
|
|
"kasa/tests/*",
|
|
|
|
"kasa/experimental/*"
|
|
|
|
]
|
2020-05-12 10:11:47 +00:00
|
|
|
|
|
|
|
[tool.coverage.report]
|
|
|
|
exclude_lines = [
|
2024-01-29 10:55:54 +00:00
|
|
|
# ignore debug logging
|
|
|
|
"if debug_enabled:",
|
2024-01-24 08:50:25 +00:00
|
|
|
# Don't complain if tests don't hit defensive assertion code:
|
|
|
|
"raise AssertionError",
|
2020-05-12 10:11:47 +00:00
|
|
|
"raise NotImplementedError",
|
2024-01-24 08:50:25 +00:00
|
|
|
# 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"
|
2020-05-12 10:11:47 +00:00
|
|
|
]
|
|
|
|
|
2021-09-19 21:45:48 +00:00
|
|
|
[tool.pytest.ini_options]
|
|
|
|
markers = [
|
|
|
|
"requires_dummy: test requires dummy data to pass, skipped on real devices",
|
|
|
|
]
|
2022-11-13 22:34:47 +00:00
|
|
|
asyncio_mode = "auto"
|
2024-09-27 09:27:53 +00:00
|
|
|
asyncio_default_fixture_loop_scope = "function"
|
2024-05-19 09:34:52 +00:00
|
|
|
timeout = 10
|
2024-09-27 16:20:25 +00:00
|
|
|
addopts = "--disable-socket --allow-unix-socket"
|
2021-09-19 21:45:48 +00:00
|
|
|
|
2022-04-05 23:13:27 +00:00
|
|
|
[tool.doc8]
|
|
|
|
paths = ["docs"]
|
|
|
|
ignore = ["D001"]
|
2023-02-18 21:09:35 +00:00
|
|
|
ignore-path-errors = ["docs/source/index.rst;D000"]
|
2022-04-05 23:13:27 +00:00
|
|
|
|
2023-10-29 22:15:42 +00:00
|
|
|
|
|
|
|
[tool.ruff]
|
|
|
|
target-version = "py38"
|
2024-04-16 18:21:20 +00:00
|
|
|
|
|
|
|
[tool.ruff.lint]
|
2023-10-29 22:15:42 +00:00
|
|
|
select = [
|
2024-09-27 15:36:41 +00:00
|
|
|
"E", # pycodestyle errors
|
|
|
|
"W", # pycodestyle warnings
|
2023-10-29 22:15:42 +00:00
|
|
|
"D", # pydocstyle
|
|
|
|
"F", # pyflakes
|
|
|
|
"UP", # pyupgrade
|
|
|
|
"B", # flake8-bugbear
|
|
|
|
"SIM", # flake8-simplify
|
2024-04-17 13:39:24 +00:00
|
|
|
"FA", # flake8-future-annotations
|
2023-10-29 22:15:42 +00:00
|
|
|
"I", # isort
|
|
|
|
"S", # bandit
|
2024-08-30 15:30:07 +00:00
|
|
|
"PT", # flake8-pytest-style
|
2024-08-30 14:13:14 +00:00
|
|
|
"LOG", # flake8-logging
|
|
|
|
"G", # flake8-logging-format
|
2023-10-29 22:15:42 +00:00
|
|
|
]
|
|
|
|
ignore = [
|
|
|
|
"D105", # Missing docstring in magic method
|
|
|
|
"D107", # Missing docstring in `__init__`
|
|
|
|
]
|
|
|
|
|
2024-04-16 18:21:20 +00:00
|
|
|
[tool.ruff.lint.pydocstyle]
|
2023-10-29 22:15:42 +00:00
|
|
|
convention = "pep257"
|
|
|
|
|
2024-04-16 18:21:20 +00:00
|
|
|
[tool.ruff.lint.per-file-ignores]
|
2023-10-29 22:15:42 +00:00
|
|
|
"kasa/tests/*.py" = [
|
|
|
|
"D100",
|
|
|
|
"D101",
|
|
|
|
"D102",
|
|
|
|
"D103",
|
|
|
|
"D104",
|
|
|
|
"S101", # allow asserts
|
|
|
|
"E501", # ignore line-too-longs
|
|
|
|
]
|
|
|
|
"docs/source/conf.py" = [
|
|
|
|
"D100",
|
|
|
|
"D103",
|
|
|
|
]
|
2024-06-19 13:07:59 +00:00
|
|
|
|
|
|
|
[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",
|
2024-07-15 12:18:43 +00:00
|
|
|
"devtools.parse_pcap_klap",
|
2024-06-19 13:07:59 +00:00
|
|
|
"devtools.perftest",
|
|
|
|
"devtools.create_module_fixtures"
|
|
|
|
]
|
|
|
|
disable_error_code = "import-not-found,import-untyped"
|