Skip to content

Commit 948cd79

Browse files
authored
[DOCS-2789] Fix malformed links in Python README (#183)
1 parent 8c57ed0 commit 948cd79

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Supported Environment Variables:
3636
* ``FAUNA_ENDPOINT``: The Fauna endpoint to use. For example, ``http://localhost:8443``
3737
* ``FAUNA_SECRET``: The Fauna secret to use.
3838

39-
```python
39+
```python
4040
from fauna import fql
4141
from fauna.client import Client
4242
from fauna.encoding import QuerySuccess
@@ -280,13 +280,12 @@ for products in pages:
280280

281281
## Event Streaming
282282

283-
The driver supports `Event Streaming <https://docs.fauna.com/fauna/current/learn/streaming>`_.
283+
The driver supports [Event Streaming](https://docs.fauna.com/fauna/current/learn/streaming).
284284

285-
_Start a stream_
285+
### Start a stream
286286

287287
To get a stream token, append ``toStream()`` or ``changesOn()`` to a set from a
288-
`supported source
289-
<https://docs.fauna.com/fauna/current/reference/streaming_reference/#supported-sources>`_.
288+
[supported source](https://docs.fauna.com/fauna/current/reference/streaming_reference/#supported-sources).
290289

291290

292291
To start and subscribe to the stream, pass the stream token to
@@ -295,20 +294,20 @@ To start and subscribe to the stream, pass the stream token to
295294
```python
296295
from fauna import fql
297296
from fauna.client import Client
298-
297+
299298
client = Client()
300-
299+
301300
response = client.query(fql('''
302301
let set = Product.all()
303302
{
304303
initialPage: set.pageSize(10),
305304
streamToken: set.toStream()
306305
}
307306
'''))
308-
307+
309308
initialPage = response.data['initialPage']
310309
streamToken = response.data['streamToken']
311-
310+
312311
client.stream(streamToken)
313312
```
314313

@@ -321,7 +320,7 @@ You can also pass a query that produces a stream token directly to
321320
client.stream(query)
322321
```
323322

324-
_Iterate on a stream_
323+
### Iterate on a stream
325324

326325
``Client.stream()`` returns an iterator that emits events as they occur. You can
327326
use a generator expression to iterate through the events:
@@ -343,7 +342,7 @@ with client.stream(query) as stream:
343342
## ...
344343
```
345344

346-
_Close a stream_
345+
### Close a stream
347346

348347
Use ``<stream>.close()`` to close a stream:
349348

@@ -356,12 +355,12 @@ with client.stream(query) as stream:
356355
print('Stream event', event)
357356
# ...
358357
count+=1
359-
358+
360359
if (count == 2):
361360
stream.close()
362361
```
363362

364-
_Error handling_
363+
### Error handling
365364

366365
If a non-retryable error occurs when opening or processing a stream, Fauna
367366
raises a ``FaunaException``:
@@ -383,7 +382,7 @@ try:
383382
except FaunaException as e:
384383
print('error ocurred with stream: ', e)
385384
```
386-
_Stream options_
385+
### Stream options
387386

388387
The client configuration sets default options for the ``Client.stream()``
389388
method.

0 commit comments

Comments
 (0)