Skip to content

x402 support - #89

Merged
Gallaecio merged 25 commits into
zytedata:mainfrom
Gallaecio:x402
Aug 7, 2025
Merged

x402 support#89
Gallaecio merged 25 commits into
zytedata:mainfrom
Gallaecio:x402

Conversation

@Gallaecio

@Gallaecio Gallaecio commented Jul 23, 2025

Copy link
Copy Markdown
Contributor

Note: There is a slight behavior change: it used to be that an empty API key defined as an environment variable was taken into account; that is no longer the case.

Comment thread zyte_api/_x402.py Outdated
Comment thread zyte_api/_x402.py Outdated
Comment thread zyte_api/_x402.py Outdated
@Gallaecio
Gallaecio marked this pull request as ready for review July 28, 2025 17:19
@Gallaecio
Gallaecio marked this pull request as draft July 28, 2025 17:19
@Gallaecio
Gallaecio requested review from kmike and wRAR July 28, 2025 17:19
@Gallaecio

Copy link
Copy Markdown
Contributor Author

@kmike @wRAR Ready for review, but marked as a draft to prevent merging before the feature is available in Zyte API.

Comment thread zyte_api/_async.py
Comment thread zyte_api/_async.py Outdated
Comment thread tests/mockserver.py Outdated
Comment thread tests/mockserver.py Outdated
@Gallaecio
Gallaecio marked this pull request as ready for review August 7, 2025 20:32
@Gallaecio
Gallaecio merged commit 01c0181 into zytedata:main Aug 7, 2025
10 checks passed
@hk2281

hk2281 commented Jul 2, 2026

Copy link
Copy Markdown

@Gallaecio @wRAR hi can ask about this feature, zyte api support it? Or is beta flow? Сuz i'm tryed used client with my eth private key and get response like this

zyte_api._errors.RequestError: RequestError: 401, message=Unauthorized, headers=<CIMultiDictProxy('Date': 'Thu, 02 Jul 2026 06:54:11 GMT', 'Content-Type': 'application/problem+json', 'Content-Length': '202', 'Connection': 'close', 'WWW-Authenticate': 'Basic realm="Zyte API"', 'Request-Id': 'cfaa93a1f5391b0b3b3ac48e769cd9d5', 'Vary': 'Accept-Encoding', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'Access-Control-Allow-Credentials': 'true', 'Access-Control-Expose-Headers': '*, X-Project-Key', 'Access-Control-Allow-Methods': 'GET, PUT, POST, DELETE, PATCH, OPTIONS', 'Access-Control-Allow-Headers': 'DNT, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Range, Authorization, X-Project-Key', 'Access-Control-Max-Age': '1728000')>, body=b'{"type":"/auth/not-valid","title":"Authentication Info Invalid","status":401,"detail":"No valid authentication info found in the request. Check the documentation for the correct authentication schema."}', request_id=cfaa93a1f5391b0b3b3ac48e769cd9d5

my env setup

Python 3.12.9

Package              Version         Editable project location
-------------------- --------------- -------------------------------------------------
aiohappyeyeballs     2.7.1
aiohttp              3.14.1
aiosignal            1.4.0
annotated-doc        0.0.4
annotated-types      0.7.0
anyio                4.14.1
attrs                26.1.0
bitarray             3.8.2
blinker              1.9.0
brotli               1.2.0
certifi              2026.6.17
charset-normalizer   3.4.7
ckzg                 2.1.7
click                8.4.2
cytoolz              1.1.0
detect-installer     0.1.0
dnspython            2.8.0
email-validator      2.3.0
eth-abi              5.2.0
eth-account          0.13.7
eth-hash             0.8.0
eth-keyfile          0.8.1
eth-keys             0.7.0
eth-rlp              2.2.0
eth-typing           6.0.0
eth-utils            6.0.0
fastapi              0.139.0
fastapi-cli          0.0.27
fastapi-cloud-cli    0.22.1
fastar               0.11.0
flask                3.1.3
frozenlist           1.8.0
h11                  0.16.0
hexbytes             1.3.1
httpcore             1.0.9
httptools            0.8.0
httpx                0.28.1
idna                 3.18
itsdangerous         2.2.0
jinja2               3.1.6
markdown-it-py       4.2.0
markupsafe           3.0.3
mdurl                0.1.2
multidict            6.7.1
parsimonious         0.10.0
propcache            0.5.2
pycryptodome         3.23.0
pydantic             2.13.4
pydantic-core        2.46.4
pydantic-extra-types 2.11.1
pydantic-settings    2.14.2
pygments             2.20.0
python-dotenv        1.2.2
python-multipart     0.0.32
pyunormalize         17.0.0
pyyaml               6.0.3
regex                2026.6.28
requests             2.34.2
rich                 15.0.0
rich-toolkit         0.20.1
rignore              0.7.6
rlp                  4.1.0
runstats             2.0.0
sentry-sdk           2.64.0
shellingham          1.5.4
starlette            1.3.1
tenacity             9.1.4
toolz                1.1.0
tqdm                 4.68.3
typer                0.26.8
types-requests       2.33.0.20260518
typing-extensions    4.15.0
typing-inspection    0.4.2
urllib3              2.7.0
uvicorn              0.49.0
uvloop               0.22.1
w3lib                2.4.1
watchfiles           1.2.0
web3                 7.16.0
websockets           15.0.1
werkzeug             3.1.8
x402                 1.0.0
yarl                 1.24.2
zyte-api             0.10.0  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants