Skip to content

Commit 21e1bc9

Browse files
sjoebooamotl
authored andcommitted
README: Add section about session_pool_size
1 parent 2a4726a commit 21e1bc9

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

README.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Tests](https://github.com/panodata/grafana-client/workflows/Test/badge.svg)](https://github.com/panodata/grafana-client/actions?query=workflow%3ATest)
44
[![Test coverage](https://img.shields.io/codecov/c/gh/panodata/grafana-client.svg?style=flat-square)](https://codecov.io/gh/panodata/grafana-client/)
5-
[![License](https://img.shields.io/github/license/panodata/grafana-client.svg?style=flat-square)](https://github.com/panodata/grafana-client/blob/main/LICENSE)
5+
[![License](https://img.shields.io/github/license/panodata/grafana-client.svg?style=flat-square)](https://github.com/panodata/grafana-client/blob/main/LICENSE)
66

77
[![Python versions](https://img.shields.io/pypi/pyversions/grafana-client.svg?style=flat-square)](https://pypi.org/project/grafana-client/)
88
[![Grafana versions](https://img.shields.io/badge/Grafana-5.x%20--%2011.x-blue.svg?style=flat-square)](https://github.com/grafana/grafana)
@@ -43,10 +43,10 @@ grafana = GrafanaApi.from_url(
4343

4444
# Create user
4545
user = grafana.admin.create_user({
46-
"name": "User",
47-
"email": "[email protected]",
48-
"login": "user",
49-
"password": "userpassword",
46+
"name": "User",
47+
"email": "[email protected]",
48+
"login": "user",
49+
"password": "userpassword",
5050
"OrgId": 1,
5151
})
5252

@@ -89,10 +89,10 @@ async def main():
8989

9090
# Create user
9191
user = await grafana.admin.create_user({
92-
"name": "User",
93-
"email": "[email protected]",
94-
"login": "user",
95-
"password": "userpassword",
92+
"name": "User",
93+
"email": "[email protected]",
94+
"login": "user",
95+
"password": "userpassword",
9696
"OrgId": 1,
9797
})
9898

@@ -207,6 +207,14 @@ export HTTP_PROXY=10.10.1.10:3128
207207
export HTTPS_PROXY=10.10.1.11:1080
208208
```
209209

210+
### Pool Size
211+
212+
By default a session pool size of 10 is used. This can be changed by passing
213+
the `session_pool_size` argument to the `GrafanaApi` constructor:
214+
```python
215+
grafana.client.session_pool_size = 32
216+
```
217+
210218
### TCP Timeout
211219

212220
The default timeout value is five seconds, used for both connect and read timeout.
@@ -216,7 +224,6 @@ The constructors of `GrafanaApi` and `GrafanaClient`, as well as the factory met
216224
scalar `float` value, or as a tuple of `(<read timeout>, <connect timeout>)`.
217225

218226

219-
220227
## Details
221228

222229
This section of the documentation outlines which parts of the Grafana HTTP API
@@ -332,7 +339,7 @@ and conceive this software in one way or another. You know who you are.
332339
### Contributing
333340

334341
Any kind of contribution and feedback are very much welcome! Just create an
335-
issue or submit a patch if you think we should include a new feature, or to
342+
issue or submit a patch if you think we should include a new feature, or to
336343
report or fix a bug.
337344

338345
The issue tracker URL is: https://github.com/panodata/grafana-client/issues

0 commit comments

Comments
 (0)