You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -157,6 +157,24 @@ a proof of concept, but know that we will not be able to merge it as-is. We sugg
157
157
an issue first to discuss with us!
158
158
159
159
On the other hand, contributions to the README are always very welcome!
160
+
## Pagination
161
+
162
+
Paginated requests will return a `SyncPager` or `AsyncPager`, which can be used as generators for the underlying object.
163
+
164
+
```python
165
+
from agentmail import AgentMail
166
+
167
+
client = AgentMail(
168
+
api_key="YOUR_API_KEY",
169
+
)
170
+
response = client.inboxes.list()
171
+
for item in response:
172
+
yield item
173
+
# alternatively, you can paginate page-by-page
174
+
for page in response.iter_pages():
175
+
yield page
176
+
```
177
+
160
178
## Websockets
161
179
162
180
The SDK supports both sync and async websocket connections for real-time, low-latency communication. Sockets can be created using the `connect` method, which returns a context manager.
0 commit comments