GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - zytedata/python-zyte-api: Python client for Zyte API

BranchesTags
Open more actions menu

Latest commit

 

History

279 Commits
279 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docs
docs
 
 
tests
tests
 
 
zyte_api
zyte_api
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
.readthedocs.yml
.readthedocs.yml
 
 
CHANGES.rst
CHANGES.rst
 
 
LICENSE
LICENSE
 
 
README.rst
README.rst
 
 
codecov.yml
codecov.yml
 
 
pyproject.toml
pyproject.toml
 
 
tox.ini
tox.ini
 
 

Repository files navigation

python-zyte-api

PyPI Version Supported Python Versions Build Status Coverage report

Command-line client and Python client library for Zyte API.

Installation

pip install zyte-api

Or, to use x402:

pip install zyte-api[x402]

Note

Python 3.11+ is required.

Basic usage

Set your API key

After you sign up for a Zyte API account, copy your API key.

Use the command-line client

Then you can use the zyte-api command-line client to send Zyte API requests. First create a text file with a list of URLs:

https://books.toscrape.com
https://quotes.toscrape.com

And then call zyte-api from your shell:

zyte-api url-list.txt --api-key YOUR_API_KEY --output results.jsonl

Use the Python sync API

For very basic Python scripts, use the sync API:

from zyte_api import ZyteAPI

client = ZyteAPI(api_key="YOUR_API_KEY")
response = client.get({"url": "https://toscrape.com", "httpResponseBody": True})

Use the Python async API

For asyncio code, use the async API:

import asyncio

from zyte_api import AsyncZyteAPI


async def main():
    client = AsyncZyteAPI(api_key="YOUR_API_KEY")
    response = await client.get(
        {"url": "https://toscrape.com", "httpResponseBody": True}
    )


asyncio.run(main())

Read the documentation for more information.

  • Documentation: https://python-zyte-api.readthedocs.io
  • Source code: https://github.com/zytedata/python-zyte-api
  • Issue tracker: https://github.com/zytedata/python-zyte-api/issues

About

Python client for Zyte API

python-zyte-api.readthedocs.io/

Topics

hacktoberfest

Resources

Readme
BSD-3-Clause license

Contributing

Contributing
Activity
Custom properties

Stars

30 stars

Watchers

11 watching

Forks

9 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.