Skip to content

Commit 869b519

Browse files
committed
fix warnings; update docs
1 parent f48669e commit 869b519

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,24 @@ configurable HTTP python client that supports
1010
- uses ultra-fast 'ujson' library for serialization'
1111
- etc.
1212

13+
### Install pyclient
14+
15+
```shell
16+
git clone clone git@github.com:vspaz/pyclient.git
17+
cd pyclient
18+
19+
pip3 install .
20+
````
21+
22+
### Run tests
23+
24+
```shell
25+
pip3 install -r requirements/dev.txt
26+
make test
27+
```
28+
29+
### Use
30+
1331
```python
1432
from pyclient.http import PyClient
1533
@@ -29,5 +47,4 @@ if __name__ == '__main__':
2947
# or simply
3048
http_client = PyClient.get_http_client()
3149
print(http_client.do_get(path='https://httpbin.org/get').json())
32-
3350
```

pyclient/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
__email__ = "wlodzimierz.trzmielinsky@gmail.com"
88
__author__ = "vspaz"
99
__maintainer__ = "vspaz"
10-
__version__ = "0.1.3"
10+
__version__ = "v0.2.0"

pyclient/http.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from typing import Union
24

35
import requests
@@ -14,7 +16,7 @@ class PyClient:
1416
def __init__(self, host: str = "", port: Union[str, int] = "") -> None:
1517
self._session: requests.Session = requests.Session()
1618
self._host: str = f"{host}{':' + str(port) if port else ''}"
17-
self._timeouts: tuple = (5, 5)
19+
self._timeouts: tuple[float, float] = (5, 5)
1820
self.set_retries()
1921
self.set_user_agent()
2022

0 commit comments

Comments
 (0)