Skip to content

Commit 743e0e4

Browse files
committed
Documentation update
1 parent 17622b5 commit 743e0e4

File tree

3 files changed

+34
-6
lines changed

3 files changed

+34
-6
lines changed

CHANGELOG-MASTER.rst

+1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ Changelog-Master
88
X.X.X (XXXX-XX-XX)
99
------------------
1010
- Add API key authentication via header to RequestsClient
11+
- Fido client is an optional dependency. **NOTE**: if you intend to use bravado with fido client you need to install bravado with fido extras (``pip install bravado[fido]``)
1112
- PLACEHOLDER (add before this line your modifications summary)

README.rst

+25-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ however Bravado aims to be a complete replacement for code generation
3737
Example Usage
3838
-------------
3939

40-
.. code:: Python
40+
.. code-block:: Python
4141
4242
from bravado.client import SwaggerClient
4343
client = SwaggerClient.from_url('http://petstore.swagger.io/v2/swagger.json')
@@ -63,7 +63,7 @@ Example with Basic Authentication
6363
pet = client.pet.getPetById(petId=42).result()
6464
6565
Example with Header Authentication
66-
---------------------------------
66+
----------------------------------
6767

6868
.. code-block:: python
6969
@@ -81,6 +81,22 @@ Example with Header Authentication
8181
)
8282
pet = client.pet.getPetById(petId=42).result()
8383
84+
Example with Fido Client (Async Http Client)
85+
--------------------------------------------
86+
87+
.. code-block:: python
88+
89+
# Install bravado with fido extra (``pip install bravado[fido]``)
90+
from bravado.fido_client import FidoClient
91+
from bravado.client import SwaggerClient
92+
93+
http_client = FidoClient()
94+
client = SwaggerClient.from_url(
95+
'http://petstore.swagger.io/v2/swagger.json',
96+
http_client=http_client,
97+
)
98+
pet = client.pet.getPetById(petId=42).result()
99+
84100
Documentation
85101
-------------
86102

@@ -89,10 +105,14 @@ More documentation is available at http://bravado.readthedocs.org
89105
Installation
90106
------------
91107

92-
::
108+
.. code-block:: bash
93109
110+
# To install bravado with Synchronous Http Client only.
94111
$ pip install bravado
95112
113+
# To install bravado with Synchronous and Asynchronous Http Client (RequestsClient and FidoClient).
114+
$ pip install bravado[fido]
115+
96116
Development
97117
===========
98118

@@ -104,10 +124,11 @@ recommended to keep dependencies and libraries isolated.
104124
Setup
105125
-----
106126

107-
::
127+
.. code-block:: bash
108128
109129
# Run tests
110130
tox
131+
111132
# Install git pre-commit hooks
112133
tox -e pre-commit install
113134

docs/source/quickstart.rst

+8-2
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,19 @@ Time to get Twisted! (Asynchronous client)
6161
6262
client = SwaggerClient.from_url(
6363
'http://petstore.swagger.io/v2/swagger.json',
64-
FidoClient())
64+
FidoClient()
65+
)
6566
6667
result = client.pet.getPetById(petId=42).result(timeout=4)
6768
6869
.. note::
6970

7071
``timeout`` parameter here is the timeout (in seconds) the call will block waiting for the complete response. The default timeout is to wait indefinitely.
7172

73+
.. note::
74+
75+
To use Fido client you should install bravado with fido extra via ``pip install bravado[fido]``.
76+
7277
This is too fancy for me! I want a simple dict response!
7378
--------------------------------------------------------
7479

@@ -81,7 +86,8 @@ This is too fancy for me! I want a simple dict response!
8186
8287
client = SwaggerClient.from_url(
8388
'http://petstore.swagger.io/v2/swagger.json',
84-
config={'use_models': False})
89+
config={'use_models': False}
90+
)
8591
8692
result = client.pet.getPetById(petId=42).result(timeout=4)
8793

0 commit comments

Comments
 (0)