-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
192 lines (177 loc) · 4.95 KB
/
Copy pathpyproject.toml
File metadata and controls
192 lines (177 loc) · 4.95 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "cycletls"
version = "0.0.3"
description = "Advanced TLS fingerprinting library with JA3, JA4, HTTP/2, HTTP/3, WebSocket, and SSE support - bypass anti-bot detection by impersonating real browsers"
readme = "README.md"
authors = [
{name = "Danny-Dasilva", email = "dannydasilva.solutions@gmail.com"}
]
license = {text = "MIT"}
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Security",
"Topic :: Software Development :: Libraries :: Python Modules",
]
keywords = [
# Core TLS fingerprinting
"tls", "tls-fingerprint", "fingerprinting", "ja3", "ja3-fingerprint", "ja4",
# Protocol support
"http2", "http2-fingerprint", "http3", "quic", "websocket", "sse",
# Use cases (high-value SEO terms)
"http-client", "web-scraping", "anti-bot", "bot-detection-bypass",
"browser-impersonation", "curl-impersonate",
# Ecosystem compatibility
"requests", "akamai-fingerprint", "cloudflare-bypass",
]
requires-python = ">=3.10"
dependencies = [
"cffi>=1.15.0",
"orjson>=3.9.0",
"ormsgpack>=1.5.0", # Rust-based msgpack, 10-30% faster
"websockets>=10.0",
"pydantic>=2.0.0",
"websocket-client>=1.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-asyncio>=0.18.0",
"pytest-xdist>=3.0.0",
"pytest-rerunfailures>=14.0",
"pytest-cov>=6.0.0",
"ruff>=0.8.0",
"pyright>=1.1.390",
"build>=1.0.0",
"pre-commit>=4.0.0",
]
docs = [
"sphinx>=7.0.0,<9.0.0", # Pin to 8.x to avoid 9.x issues
"sphinx-copybutton>=0.5.0",
"sphinx-autodoc-typehints>=1.23.0",
"myst-parser>=2.0.0",
"furo>=2023.0.0",
"requests>=2.31.0", # Required by sphinx.builders.linkcheck
]
benchmark = [
# HTTP client libraries for testing
"requests>=2.31.0",
"httpx>=0.24.0",
"aiohttp>=3.8.0",
"curl-cffi>=0.5.0",
"niquests>=3.0.0",
"pycurl>=7.45.0",
"tls-client>=0.2.0",
"rnet>=0.0.1",
# TLS spoofing libraries
"primp>=0.6.0",
"hrequests>=0.7.0",
# Visualization and data processing
"matplotlib>=3.7.0",
"pandas>=2.0.0",
# Performance utilities
"uvloop>=0.17.0; sys_platform != 'win32'",
]
[project.urls]
Homepage = "https://github.com/Danny-Dasilva/cycletls_python"
Documentation = "https://github.com/Danny-Dasilva/cycletls_python#readme"
Repository = "https://github.com/Danny-Dasilva/cycletls_python"
"Bug Tracker" = "https://github.com/Danny-Dasilva/cycletls_python/issues"
[tool.hatch.build.targets.wheel]
packages = ["cycletls"]
[tool.hatch.build.targets.wheel.hooks.custom]
path = "hatch_build.py"
[tool.ruff]
line-length = 100
target-version = "py310"
exclude = [
"__pycache__",
".git",
".mypy_cache",
".pytest_cache",
".vscode",
".venv",
"dist",
"doc",
"golang",
"benchmarks",
"examples",
]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "B", "C4"]
ignore = [
"E501", # Line length handled by formatter
"F405", # Star imports used intentionally for re-exports in __init__.py
"B904", # raise from - not always clearer
]
# Note: UP (pyupgrade) and SIM rules removed to avoid forcing style migrations
[tool.ruff.lint.isort]
known-first-party = ["cycletls"]
[tool.pyright]
pythonVersion = "3.10"
exclude = [
"build/",
"dist/",
"golang/",
"benchmarks/",
"tests/",
"examples/",
"scripts/",
]
reportMissingImports = true
reportMissingTypeStubs = false
# FFI bindings use dynamic attributes loaded from Go shared library at runtime
reportAttributeAccessIssue = false
reportOptionalCall = false
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--strict-markers",
"--tb=short",
]
asyncio_mode = "auto"
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
"live: marks tests that run against live tlsfingerprint.com (deselect with '-m \"not live\"')",
"blocking: marks tests as CI-blocking - failures will fail the CI pipeline",
]
[tool.coverage.run]
source = ["cycletls"]
omit = [
"cycletls/dist/*",
"*/tests/*",
]
[tool.coverage.report]
show_missing = true
skip_empty = true
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if TYPE_CHECKING:",
"if __name__ == .__main__.",
"raise NotImplementedError",
"@overload",
]
[tool.coverage.html]
directory = "htmlcov"
[dependency-groups]
dev = [
"pytest-asyncio>=1.3.0",
]