-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathpyproject.toml
More file actions
114 lines (103 loc) · 3.55 KB
/
Copy pathpyproject.toml
File metadata and controls
114 lines (103 loc) · 3.55 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "zenrows"
version = "1.4.0"
description = "ZenRows Python SDK — synchronous scraping + Batch (async job) API"
readme = "README.md"
license = { text = "MIT" }
authors = [
{ name = "ZenRows", email = "support@zenrows.com" },
]
keywords = ["zenrows", "scraper", "scraping", "async", "batch"]
classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.10"
dependencies = [
# Legacy scraping client (zenrows.ZenRowsClient).
"requests>=2.31",
# Batch (zenrows.batch) — pydantic v2 models + httpx transport.
"httpx>=0.27",
"pydantic>=2.9",
# Progress bars for `wait_for_run` / `download_to_*`. Tiny, no
# transitive deps; users in minimal envs can still uninstall it
# — the helpers lazy-import and degrade to no-op.
"tqdm>=4.66",
# `typing.NotRequired` is 3.11+; on 3.10 it comes from here.
# (pydantic already pulls this transitively — declared explicitly.)
"typing-extensions>=4.0; python_version < '3.11'",
]
[project.urls]
Homepage = "https://www.zenrows.com/"
Documentation = "https://www.zenrows.com/documentation"
Repository = "https://github.com/ZenRows/zenrows-python-sdk"
Issues = "https://github.com/ZenRows/zenrows-python-sdk/issues"
[tool.hatch.build.targets.wheel]
packages = ["src/zenrows"]
[tool.hatch.build.targets.sdist]
include = ["src/zenrows", "README.md", "LICENSE"]
# --- uv ---
[tool.uv]
dev-dependencies = [
"pytest>=8",
"pytest-asyncio>=0.24",
"pytest-httpx>=0.30",
"ruff>=0.7",
"respx>=0.21",
# Astral static type checker (preview). Dev-only — never ships.
# Unpinned on purpose: we ride latest. It moves fast; if a release
# turns `make check` red, that's the signal, not a regression to revert.
"ty",
# OpenAPI → pydantic-v2 models. Run via `uv run make-models`
# (Makefile recipe). Output lands at src/zenrows/batch/models.py.
"datamodel-code-generator>=0.26",
]
# --- ruff ---
[tool.ruff]
line-length = 100
target-version = "py310"
# Generated code is owned by the codegen tool; don't lint it.
extend-exclude = ["src/zenrows/batch/models.py"]
[tool.ruff.lint]
# Tasteful default. Add rules over time; don't import-storm now.
select = [
"E", # pycodestyle errors
"F", # pyflakes
"W", # pycodestyle warnings
"I", # isort
"B", # flake8-bugbear
"UP", # pyupgrade — keeps us on modern syntax (no __future__)
"SIM", # flake8-simplify
"RUF", # ruff-specific
]
ignore = [
# We deliberately don't use `from __future__ import annotations` —
# 3.10 is the floor and `X | Y` is native.
"UP037",
]
[tool.ruff.lint.isort]
known-first-party = ["zenrows"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
# --- ty (static type checker) ---
[tool.ty.src]
# Generated code is owned by the codegen tool; don't type-check it
# (still imported for type resolution — exclude only suppresses its diagnostics).
exclude = ["src/zenrows/batch/models.py"]
# --- pytest ---
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra --strict-markers"
asyncio_mode = "auto"