Skip to content

Commit ab52af1

Browse files
committed
docs: add custom certificate documentation
1 parent 7d589e8 commit ab52af1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/usage.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,21 @@ object in-place and returns no result. A warning is emitted if your
323323
``modifier`` returns a non-None result that is not the same object as the
324324
input.
325325

326+
Using custom certificates
327+
-------------------------
328+
329+
If you need to use custom certificates in your ``pystac-client`` requests, you can
330+
customize the :class:`StacApiIO<pystac_client.stac_api_io.StacApiIO>` instance before
331+
creating your :class:`Client<pystac_client.Client>`.
332+
333+
.. code-block:: python
334+
335+
>>> from pystac_client.stac_api_io import StacApiIO
336+
>>> from pystac_client.client import Client
337+
>>> stac_api_io = StacApiIO()
338+
>>> stac_api_io.session.verify = "/path/to/certfile"
339+
>>> client = Client.open("https://planetarycomputer.microsoft.com/api/stac/v1", stac_io=stac_api_io)
340+
326341
Loading data
327342
++++++++++++
328343

0 commit comments

Comments
 (0)