Skip to content

Commit 2f2bb81

Browse files
committed
docs(README): Demonstrate filter and get
1 parent e3ebf77 commit 2f2bb81

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,17 @@ List sessions:
7373
[Session($1 ...), Session($0 ...)]
7474
```
7575

76-
Find session:
76+
Filter sessions by attribute:
7777

7878
```python
79-
>>> server.sessions.filter(session_id='$1')[0]
79+
>>> server.sessions.filter(history_limit='2000')
80+
[Session($1 ...), Session($0 ...)]
81+
```
82+
83+
Direct lookup:
84+
85+
```python
86+
>>> server.sessions.get(session_id="$1")
8087
Session($1 ...)
8188
```
8289

0 commit comments

Comments
 (0)