Zyte-api

Latest version: v0.7.0

Safety actively analyzes 722032 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

0.7.0

------------------

* Dropped support for Python 3.8, added support for Python 3.12 and 3.13.

* Renamed some methods of :class:`~.RetryFactory` for consistency, since they
now handle both temporary and permanent download errors:

* ``temporary_download_error_stop`` →
:meth:`~.RetryFactory.download_error_stop`

* ``temporary_download_error_wait`` →
:meth:`~.RetryFactory.download_error_wait`

* Made the :ref:`default retry policy <default-retry-policy>` behave like the
:ref:`aggressive retry policy <aggressive-retry-policy>`, but with half the
retry attempts:

* :ref:`Permanent download errors <zapi-permanent-download-errors>` now also
count towards the retry limit of :ref:`temporary download errors
<zapi-temporary-download-errors>`.

* Permanent download errors are now retried once.

* Error responses with an HTTP status code in the 500-599 range (503, 520 and
521 excluded) are now retried once.

* Fixed the session example of the :ref:`async API <asyncio_api>`.

0.6.0

------------------

* Improved how the :ref:`default retry policy <default-retry-policy>` handles
:ref:`temporary download errors <zapi-temporary-download-errors>`.
Before, 3 HTTP 429 responses followed by a single HTTP 520 response would
have prevented a retry. Now, unrelated responses and errors do not count
towards the HTTP 520 retry limit.

* Improved how the :ref:`default retry policy <default-retry-policy>` handles
network errors. Before, after 15 minutes of unsuccessful responses (e.g. HTTP
429), any network error would prevent a retry. Now, network errors must happen
15 minutes in a row, without different errors in between, to stop retries.

* Implemented an optional :ref:`aggressive retry policy
<aggressive-retry-policy>`, which retries more errors more often, and could
be useful for long crawls or websites with a low success rate.

* Improved the exception that is raised when passing an invalid retrying policy
object to a :ref:`Python client <api>`.

0.5.2

------------------

* :class:`~zyte_api.RequestError` now has a :data:`~zyte_api.RequestError.query`
attribute with the Zyte API request parameters that caused the error.

0.5.1

------------------

* :class:`~zyte_api.ZyteAPI` and :class:`~zyte_api.AsyncZyteAPI` sessions no
longer need to be used as context managers, and can instead be closed with a
``close()`` method.

0.5.0

------------------

* Removed Python 3.7 support.

* Added :class:`~zyte_api.ZyteAPI` and :class:`~zyte_api.AsyncZyteAPI` to
provide both sync and async Python interfaces with a cleaner API.

* Deprecated ``zyte_api.aio``:

* Replace ``zyte_api.aio.client.AsyncClient`` with the new
:class:`~zyte_api.AsyncZyteAPI` class.

* Replace ``zyte_api.aio.client.create_session`` with the new
:meth:`AsyncZyteAPI.session <zyte_api.AsyncZyteAPI.session>` method.

* Import ``zyte_api.aio.errors.RequestError``,
``zyte_api.aio.retry.RetryFactory`` and
``zyte_api.aio.retry.zyte_api_retrying`` directly from ``zyte_api`` now.

* When using the command-line interface, you can now use ``--store-errors`` to
have error responses be stored alongside successful responses.

* Improved the documentation.

0.4.8

------------------

* Include the Zyte API request ID value in a new ``.request_id`` attribute
in ``zyte_api.aio.errors.RequestError``.

Page 1 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.