Skip to content

Commit 8301002

Browse files
committed
Add notes on threading
1 parent 6ba44e9 commit 8301002

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,13 @@ nb.dcim.devices.all()
3838
[test1-leaf1, test1-leaf2]
3939
```
4040

41+
### Threading
42+
43+
pynetbox supports multithreaded calls (in Python 3 only) for `.filter()` and `.all()` queries. It is **highly recommended** you have `MAX_PAGE_SIZE` in your Netbox install set to anything *except* `0` or `None`. The default value of `1000` is usually a good value to use. To enable threading, add `threading=True` parameter to the `.api`:
44+
45+
```python
46+
nb = pynetbox.api(
47+
'http://localhost:8000',
48+
threading=True,
49+
)
50+
```

0 commit comments

Comments
 (0)