Skip to content

Commit

Permalink
Include basic usage examples in the README (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gallaecio authored Mar 19, 2024
1 parent d31e2d9 commit bf6e901
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,27 @@ Make sure you have an API key for the `Zyte API`_ service.
You can set ``ZYTE_API_KEY`` environment
variable with the key to avoid passing it around explicitly.

Read the `documentation <https://python-zyte-api.readthedocs.io>`_ for more information.

Basic usage
===========

Use the ``zyte-api`` command to send Zyte API requests from the command line:

.. code-block:: shell
zyte-api url-list.txt --output results.jsonl
Or use the Python async API:

.. code-block:: python
from zyte_api import AsyncZyteAPI
client = AsyncZyteAPI()
response = await client.get({"url": url, "httpResponseBody": True})
Read the `documentation <https://python-zyte-api.readthedocs.io>`_ for more
information.

License is BSD 3-clause.

Expand Down

0 comments on commit bf6e901

Please sign in to comment.