python-http_request 0.1.6__py3-none-any.whl → 0.1.6.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-http_request
3
- Version: 0.1.6
3
+ Version: 0.1.6.1
4
4
  Summary: Python http request utils.
5
5
  Home-page: https://github.com/ChenyangGao/python-modules/tree/main/python-http_request
6
6
  License: MIT
@@ -51,3 +51,40 @@ import http_request
51
51
  import http_request.extension
52
52
  ```
53
53
 
54
+ ## Extension
55
+
56
+ I've implemented several modules, all of which provide a ``request`` function. Their signatures are similar, so they can be used as drop-in replacements for each other.
57
+
58
+ 1. [aiohttp_client_request](https://pypi.org/project/aiohttp_client_request/)
59
+ 1. [aiosonic_request](https://pypi.org/project/aiosonic_request/)
60
+ 1. [asks_request](https://pypi.org/project/asks_request/)
61
+ 1. [blacksheep_client_request](https://pypi.org/project/blacksheep_client_request/)
62
+ 1. [curl_cffi_request](https://pypi.org/project/curl_cffi_request/)
63
+ 1. [http_client_request](https://pypi.org/project/http_client_request/)
64
+ 1. [httpcore_request](https://pypi.org/project/httpcore_request/)
65
+ 1. [httpx_request](https://pypi.org/project/httpx_request/)
66
+ 1. [pycurl_request](https://pypi.org/project/pycurl_request/)
67
+ 1. [python-urlopen](https://pypi.org/project/python-urlopen/)
68
+ 1. [requests_request](https://pypi.org/project/requests_request/)
69
+ 1. [tornado_client_request](https://pypi.org/project/tornado_client_request/)
70
+ 1. [urllib3_request](https://pypi.org/project/urllib3_request/)
71
+
72
+ To make it more general, I've encapsulated a ``request`` function
73
+
74
+ ```python
75
+ from http_request.extension import request
76
+ ```
77
+
78
+ You just need to implement a ``urlopen`` function pass to ``request``, then it can be directly extended. The ``urlopen`` function signature is roughly as follows:
79
+
80
+ ```python
81
+ def urlopen[Response](
82
+ url: str,
83
+ method: str,
84
+ data=None,
85
+ headers: None | dict[str, str] = None,
86
+ **request_args,
87
+ ) -> Response:
88
+ ...
89
+ ```
90
+
@@ -3,7 +3,7 @@ http_request/__init__.py,sha256=mWKUuVYj08ugYlzjzlKW0f-fUjMkKzz91GwHZ4usjYA,1874
3
3
  http_request/extension/__init__.py,sha256=3dvnzgkk04xtCSbdThHZxZH05H1BOuE3bzdFwADdY2U,63
4
4
  http_request/extension/request.py,sha256=W6USeI6G2jxEDwmDE1w0Mm73xfmF1WSDpVh1PPa-h9E,26321
5
5
  http_request/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- python_http_request-0.1.6.dist-info/LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
7
- python_http_request-0.1.6.dist-info/METADATA,sha256=m3wZpwodKHF1IoDzUeAt557xWPlMxCst1A0O9os6P3U,1727
8
- python_http_request-0.1.6.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
9
- python_http_request-0.1.6.dist-info/RECORD,,
6
+ python_http_request-0.1.6.1.dist-info/LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
7
+ python_http_request-0.1.6.1.dist-info/METADATA,sha256=0LfFe1b-r8XKEs_1ItDZQl-W_mGIg1w9k2Fe2-ikl4Y,3263
8
+ python_http_request-0.1.6.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
9
+ python_http_request-0.1.6.1.dist-info/RECORD,,