Skip to content

Commit

Permalink
Update several feature names to sentence case
Browse files Browse the repository at this point in the history
  • Loading branch information
jrodewig committed Jan 22, 2025
1 parent 6de402a commit b245ba6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,13 @@ for products in pages:
print(products)
```

## Event Feeds
## Event feeds

The driver supports [Event Feeds](https://docs.fauna.com/fauna/current/learn/cdc/#event-feeds).
The driver supports [event feeds](https://docs.fauna.com/fauna/current/learn/cdc/#event-feeds).

### Request an Event Feed
### Request an event feed

An Event Feed asynchronously polls an [event source](https://docs.fauna.com/fauna/current/learn/cdc/#create-an-event-source)
An event feed asynchronously polls an [event source](https://docs.fauna.com/fauna/current/learn/cdc/#create-an-event-source)
for paginated events.

To get an event source, append ``eventSource()`` or ``eventsOn()`` to a
Expand Down Expand Up @@ -327,7 +327,7 @@ You can also pass a query that produces an event source directly to ``feed()``:
client.feed(query)
```

### Iterate on an Event Feed
### Iterate on an event feed

``feed()`` returns an iterator that emits pages of events. You can use a
generator expression to iterate through the pages:
Expand Down Expand Up @@ -364,11 +364,11 @@ Alternatively, you can iterate through events instead of pages with
## ...
```

The Event Feed iterator stops when there are no more events to poll.
The event feed iterator stops when there are no more events to poll.

### Error handling

If a non-retryable error occurs when opening or processing an Event Feed, Fauna
If a non-retryable error occurs when opening or processing an event feed, Fauna
raises a ``FaunaException``:

```python
Expand Down Expand Up @@ -422,7 +422,7 @@ processing. For example:
print('error ocurred with event processing: ', e)
```

### Event Feed options
### Event feed options

The client configuration sets default options for the ``feed()`` method.

Expand All @@ -441,14 +441,14 @@ options = FeedOptions(
client.feed(fql('Product.all().eventSource()'), options)
```

## Event Streaming
## Event streams

The driver supports [Event
Streaming](https://docs.fauna.com/fauna/current/reference/cdc/#event-streaming).
The driver supports [event
streams](https://docs.fauna.com/fauna/current/reference/cdc/#event-streaming).

### Start a stream

An Event Stream lets you consume events from an [event
An event stream lets you consume events from an [event
source](https://docs.fauna.com/fauna/current/learn/cdc/#create-an-event-source)
as a real-time subscription.

Expand Down
12 changes: 6 additions & 6 deletions fauna/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ class StreamOptions:
@dataclass
class FeedOptions:
"""
A dataclass representing options available for an Event Feed.
A dataclass representing options available for an event feed.
* max_attempts - The maximum number of times to attempt an Event Feed query when a retryable exception is thrown.
* max_attempts - The maximum number of times to attempt an event feed query when a retryable exception is thrown.
* max_backoff - The maximum backoff in seconds for an individual retry.
* query_timeout - Controls the maximum amount of time Fauna will execute a query before returning a page of events.
* start_ts - The starting timestamp of the Event Feed, exclusive. If set, Fauna will return events starting after
* start_ts - The starting timestamp of the event feed, exclusive. If set, Fauna will return events starting after
the timestamp.
* cursor - The starting event cursor, exclusive. If set, Fauna will return events starting after the cursor.
* page_size - Maximum number of events returned per page. Must be in the
Expand Down Expand Up @@ -468,10 +468,10 @@ def feed(
opts: FeedOptions = FeedOptions(),
) -> "FeedIterator":
"""
Opens an Event Feed in Fauna and returns an iterator that consume Fauna events.
Opens an event feed in Fauna and returns an iterator that consume Fauna events.
:param source: An EventSource or a Query that returns an EventSource.
:param opts: (Optional) Event Feed options.
:param opts: (Optional) Event feed options.
:return: a :class:`FeedIterator`
Expand Down Expand Up @@ -661,7 +661,7 @@ def __iter__(self) -> Iterator[Any]:


class FeedIterator:
"""A class to provide an iterator on top of Event Feed pages."""
"""A class to provide an iterator on top of event feed pages."""

def __init__(self, http: HTTPClient, headers: Dict[str, str], endpoint: str,
max_attempts: int, max_backoff: int, opts: FeedOptions,
Expand Down

0 comments on commit b245ba6

Please sign in to comment.