Skip to content

Commit e7610cc

Browse files
committed
Merge remote-tracking branch 'origin/request_executor_overloads'
2 parents 0c7cb6f + 5553718 commit e7610cc

File tree

15 files changed

+381
-549
lines changed

15 files changed

+381
-549
lines changed

docs/source/examples/index.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/source/examples/ngfw.rst

Lines changed: 0 additions & 232 deletions
This file was deleted.

docs/source/refexamples/examples/basic.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Basic Examples
44
Create client
55
-------------
66

7+
Snippet below will load version during runtime, based on the SDWAN version it connects to. It will provide type hints for all installed versions.
8+
79
.. code-block:: python
810
911
from catalystwan.core.client import create_client
@@ -16,6 +18,27 @@ Create client
1618
) as client:
1719
...
1820
21+
If you want to choose version manually (and use type hints for that version alone), you can pass desired ``ApiClient`` version to the ``api_client_class`` argument.
22+
23+
.. note::
24+
25+
Keep in mind: ``api_client_class`` is a keyword only argument.
26+
27+
.. code-block:: python
28+
29+
from catalystwan.core.client import create_client
30+
from catalystwan.core.loader import load_client
31+
32+
33+
with create_client(
34+
url=SDWAN_URL,
35+
port=SDWAN_PORT,
36+
username=SDWAN_USERNAME,
37+
password=SDWAN_PASSWORD,
38+
api_client_class=load_client(version="20.15"),
39+
) as client:
40+
...
41+
1942
Client Annotation
2043
-----------------
2144

0 commit comments

Comments
 (0)