Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ jobs:
fail-fast: false
matrix:
include:
- python-version: "3.9"
- python-version: "3.10"
tox: min
- python-version: "3.9"
- python-version: "3.10"
tox: min-x402
- python-version: "3.10"
Expand Down Expand Up @@ -53,7 +52,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.13"] # Keep in sync with .readthedocs.yml
python-version: ["3.13"] # In sync with pyproject.toml
tox-job: ["mypy", "docs"]

steps:
Expand Down
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ repos:
rev: v1.0.0
hooks:
- id: sphinx-lint
- repo: https://github.com/scrapy/sphinx-scrapy
rev: 0.8.3
hooks:
- id: sphinx-scrapy
16 changes: 6 additions & 10 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
version: 2
formats: all
sphinx:
configuration: docs/conf.py
build:
os: ubuntu-24.04
tools:
# For available versions, see:
# https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python
python: "3.13" # Keep in sync with .github/workflows/test.yml
python:
install:
- requirements: docs/requirements.txt
- path: .
python: "3.13"
commands:
- pip install tox
- tox -e docs
- mkdir -p $READTHEDOCS_OUTPUT/html
- cp -a docs/_build/all/. $READTHEDOCS_OUTPUT/html/
5 changes: 0 additions & 5 deletions MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Or, to use x402_:

pip install zyte-api[x402]

.. note:: Python 3.9+ is required; Python 3.10+ if using x402.
.. note:: Python 3.10+ is required.

.. install-end

Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/_build/
33 changes: 7 additions & 26 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@
sys.path.insert(0, str(Path(__file__).parent.absolute())) # _ext
extensions = [
"_ext",
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx_scrapy",
"sphinx.ext.ifconfig",
"sphinx.ext.viewcode",
"sphinx.ext.githubpages",
"sphinxarg.ext",
]
Expand Down Expand Up @@ -188,33 +186,16 @@
# not turned into –api-key in descriptions.
smartquotes = False


# -- Extension configuration -------------------------------------------------

# -- Options for intersphinx extension ---------------------------------------
intersphinx_mapping = {
"python": (
"https://docs.python.org/3",
None,
),
"aiohttp": (
"https://docs.aiohttp.org/en/stable/",
None,
),
"tenacity": (
"https://tenacity.readthedocs.io/en/latest/",
None,
),
"zyte": (
"https://docs.zyte.com",
None,
),
}

autodoc_default_options = {
# 'special-members': '__init__,__call__',
# 'undoc-members': True,
"exclude-members": "__weakref__"
}

add_module_names = False

scrapy_intersphinx_enable = [
"aiohttp",
"tenacity",
"zyte",
]
6 changes: 6 additions & 0 deletions docs/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
aiohttp
sphinx
sphinx-argparse
sphinx-rtd-theme
sphinx-scrapy @ git+https://github.com/scrapy/sphinx-scrapy.git@0.8.3
tenacity
112 changes: 107 additions & 5 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,107 @@
aiohttp >= 3.6.0
Sphinx >= 4.2.0
sphinx-argparse
sphinx-rtd-theme >= 0.4
tenacity
# This file was autogenerated by uv via the following command:
# uv pip compile -p 3.14 requirements.in -o requirements.txt
aiohappyeyeballs==2.6.1
# via aiohttp
aiohttp==3.13.5
# via -r requirements.in
aiosignal==1.4.0
# via aiohttp
alabaster==1.0.0
# via sphinx
attrs==26.1.0
# via aiohttp
babel==2.18.0
# via sphinx
certifi==2026.2.25
# via requests
charset-normalizer==3.4.7
# via requests
docutils==0.22.4
# via
# sphinx
# sphinx-argparse
# sphinx-markdown-builder
# sphinx-rtd-theme
frozenlist==1.8.0
# via
# aiohttp
# aiosignal
idna==3.12
# via
# requests
# yarl
imagesize==2.0.0
# via sphinx
jinja2==3.1.6
# via sphinx
markupsafe==3.0.3
# via jinja2
multidict==6.7.1
# via
# aiohttp
# yarl
packaging==26.1
# via
# sphinx
# sphinx-scrapy
propcache==0.4.1
# via
# aiohttp
# yarl
pygments==2.20.0
# via sphinx
requests==2.33.1
# via sphinx
roman-numerals==4.1.0
# via sphinx
snowballstemmer==3.0.1
# via sphinx
sphinx==9.1.0
# via
# -r requirements.in
# sphinx-argparse
# sphinx-copybutton
# sphinx-last-updated-by-git
# sphinx-llms-txt
# sphinx-markdown-builder
# sphinx-rtd-theme
# sphinx-scrapy
# sphinxcontrib-jquery
sphinx-argparse==0.5.2
# via -r requirements.in
sphinx-copybutton==0.5.2
# via sphinx-scrapy
sphinx-last-updated-by-git==0.3.8
# via sphinx-sitemap
sphinx-llms-txt @ git+https://github.com/zytedata/sphinx-llms-txt.git@5e8866cb0cc249aa2017ad9050b3b83a7ca16f69
# via sphinx-scrapy
sphinx-markdown-builder @ git+https://github.com/zytedata/sphinx-markdown-builder.git@cfe4c0bfd7b4542f7e6b65a58cdf9ec765829940
# via sphinx-scrapy
sphinx-rtd-theme==3.1.0
# via -r requirements.in
sphinx-scrapy @ git+https://github.com/scrapy/sphinx-scrapy.git@f20366277f2598d0c8a60e55fe282aff2da40dcf
# via -r requirements.in
sphinx-sitemap==2.9.0
# via sphinx-scrapy
sphinxcontrib-applehelp==2.0.0
# via sphinx
sphinxcontrib-devhelp==2.0.0
# via sphinx
sphinxcontrib-htmlhelp==2.1.0
# via sphinx
sphinxcontrib-jquery==4.1
# via sphinx-rtd-theme
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==2.0.0
# via sphinx
sphinxcontrib-serializinghtml==2.0.0
# via sphinx
tabulate==0.10.0
# via sphinx-markdown-builder
tenacity==9.1.4
# via -r requirements.in
urllib3==2.6.3
# via requests
yarl==1.23.0
# via aiohttp
71 changes: 68 additions & 3 deletions pyproject.toml
Comment thread
AdrianAtZyte marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,3 +1,68 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "zyte-api"
dynamic = ["version"]
description = "Python interface to Zyte API"
readme = { file = "README.rst", content-type = "text/x-rst" }
authors = [
{ name = "Zyte Group Ltd", email = "opensource@zyte.com" },
]
license = { file = "LICENSE" }
requires-python = ">=3.10"
dependencies = [
"aiohttp>=3.8.0",
"attrs>=20.1.0",
"brotli>=0.5.2",
"runstats>=0.0.1",
"tenacity>=8.2.0",
"tqdm>=4.16.0",
"w3lib>=2.1.1",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]

[project.optional-dependencies]
x402 = [
"eth-account>=0.13.7",
"x402>=0.1.1,<2.0.0",
]

[project.scripts]
zyte-api = "zyte_api.__main__:_main"

[project.urls]
Homepage = "https://github.com/zytedata/python-zyte-api"
Documentation = "https://python-zyte-api.readthedocs.io/en/stable/"

[tool.hatch.build.targets.sdist]
include = [
"/docs",
"/tests",
"/zyte_api",
"/.pre-commit-config.yaml",
"/CHANGES.rst",
"/tox.ini",
]

[tool.hatch.version]
path = "zyte_api/__version__.py"

[tool.hatch.build.targets.wheel]
packages = ["zyte_api"]

[tool.bumpversion]
current_version = "0.9.0"
commit = true
Expand All @@ -13,9 +78,6 @@ regex = true
[[tool.bumpversion.files]]
filename = "docs/conf.py"

[[tool.bumpversion.files]]
filename = "setup.py"

[[tool.bumpversion.files]]
filename = "zyte_api/__version__.py"

Expand Down Expand Up @@ -188,3 +250,6 @@ split-on-trailing-comma = false

[tool.ruff.lint.pydocstyle]
convention = "pep257"

[tool.sphinx-scrapy]
python-version = "3.13" # In sync with test.yml
50 changes: 0 additions & 50 deletions setup.py

This file was deleted.

Loading
Loading