Zyte-api

Latest version: v0.6.0

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

Scan your dependencies

Page 1 of 4

0.6.0

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

* Improved how the :ref:`default retry policy <default-retry-policy>` handles
:ref:`temporary download errors <zyte-api-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``.

0.4.7

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

* ``AsyncClient`` now lets you set a custom user agent to send to Zyte API.

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.