A simple HTTP client for daily usage. Wrapper around httpx
Project description
Installation
pip install zimran-http
Usage
from zimran.http_client import AsyncHttpClient, HttpClient
# async
async with AsyncHttpClient(service='...') as client:
response = await client.get('/endpoint')
# sync
client = HttpClient(service='...')
response = client.get('/endpoint')
# custom response handler
async def custom_handler(response: httpx.Response):
# your logic with response handler here
...
response = await client.get('/endpoint', response_handler=custom_handler)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zimran_http-1.0.0.tar.gz
(6.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zimran_http-1.0.0.tar.gz.
File metadata
- Download URL: zimran_http-1.0.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e446107d745cc9a63086f827f67a3c9034ce6819d08184c436a01096fe33e7b1
|
|
| MD5 |
7328cd7d6441c1554ecce6a443ea80f7
|
|
| BLAKE2b-256 |
14a05f76a738ad04df26c7fef44d5dd981570a0c310ee39b713db99e2165b205
|
File details
Details for the file zimran_http-1.0.0-py3-none-any.whl.
File metadata
- Download URL: zimran_http-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd946a52f7ded764f00c11ca97fa6f2501a0df937f4cba9517116fd0b101917e
|
|
| MD5 |
173631b0949246e539639b5e7c3747fb
|
|
| BLAKE2b-256 |
12daa6c19f29368e2ca2f9f2be69f24a58cc3d8ad8646bf305be6b7ef2bad2ac
|