-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathpyproject.toml
More file actions
134 lines (122 loc) · 3.08 KB
/
pyproject.toml
File metadata and controls
134 lines (122 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "tikhub"
version = "2.1.1"
description = "Modern Python SDK for the TikHub social-media data API."
readme = "README.md"
license = "MIT"
requires-python = ">=3.9"
authors = [{ name = "TikHub" }]
keywords = [
"tikhub",
"douyin",
"tiktok",
"xiaohongshu",
"bilibili",
"weibo",
"instagram",
"youtube",
"twitter",
"social-media",
"api",
"sdk",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"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",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dependencies = [
"httpx>=0.27",
"pydantic>=2.6",
"anyio>=4.0",
"typer>=0.12",
]
[project.optional-dependencies]
docs = [
"mkdocs>=1.6",
"mkdocs-material>=9.5",
]
dev = [
"pytest>=8.0",
"pytest-asyncio>=0.23",
"respx>=0.21",
"ruff>=0.5",
"mypy>=1.10",
"typer>=0.12",
"mkdocs>=1.6",
"mkdocs-material>=9.5",
]
[project.scripts]
tikhub = "tikhub.cli.main:main"
[project.urls]
Homepage = "https://github.com/TikHub/TikHub-API-Python-SDK-V2"
Documentation = "https://docs.tikhub.io"
Issues = "https://github.com/TikHub/TikHub-API-Python-SDK-V2/issues"
[tool.hatch.build.targets.wheel]
packages = ["src/tikhub"]
[tool.hatch.build.targets.sdist]
include = [
"src/tikhub",
"tests",
"README.md",
"LICENSE",
"CHANGELOG.md",
"pyproject.toml",
]
[tool.ruff]
line-length = 100
target-version = "py39"
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"UP", # pyupgrade
"N", # pep8-naming
"RUF", # ruff-specific
]
ignore = [
"E501", # handled by formatter
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["N802", "N803"]
# Generated resource files mirror the OpenAPI spec verbatim:
# - bilingual docstrings include CJK punctuation (RUF002, RUF003)
# - method and parameter names match the API exactly (N802, N803)
"src/tikhub/resources/*.py" = ["RUF002", "RUF003", "N802", "N803"]
# Generated example scripts contain the same bilingual upstream comments
# and pass through the API's verbatim parameter names.
"examples/*.py" = ["RUF002", "RUF003", "N802", "N803", "E501"]
[tool.mypy]
python_version = "3.9"
strict = true
warn_unreachable = true
warn_unused_ignores = true
files = ["src/tikhub"]
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
filterwarnings = [
"error",
"ignore::DeprecationWarning",
]