Httpx, but made easy
The easiest way to interact with the httpx library, including Sync and Async clients.
Functionality
Simplify the way we have to interact with external urls and make requests (POST, GET, etc.).
Usage
Using this library is as simple and intuitive as doing this:
# Create an Async instance within this context
async with AsyncHttpClient() as http_client:
# Make a no-stream GET request
response = await http_client.get.complete(
url = url
)
# Create a Sync instance within this context
with HttpClient() as http_client:
# Make a no-stream GET request
response = http_client.get.complete(
url = url
)
or this:
# Create an Async client instance within a context
async with HttpClient() as http_client:
# Make a stream GET request
async with await http_client.get.stream(
url = url
) as response:
# Do whatever you need with the response
chunks_count = 0
bytes = b""
# Iterate over the bytes asynchronously
async for chunk in response.aiter_bytes(
chunk_size = chunk_size
):
bytes += chunk
chunks_count += 1
The resources are closed and freed once you are done. Easy.
She the tests to know more about how to use it.
Metadata
Release files for httpx-easy 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| httpx_easy-0.1.0.tar.gz | 12.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| httpx_easy-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.6 kB
Release files / httpx_easy-0.1.0.tar.gz
| Download URL | httpx_easy-0.1.0.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
919687c51ca05a77e0205aae2c4c80f2224ddd9762590b00c09b8e0796da3c6a
|
|
BLAKE2b-256 checksum How to use checksums |
cee858e9b2834d530c727b63e022a4a6f297dcf42e5ecfa2eb348a41e121dade
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.0 CPython/3.9.0 Windows/10
|
Release files / httpx_easy-0.1.0-py3-none-any.whl
| Download URL | httpx_easy-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6993db4097fc8d5ce504d218c06e0b0629db26ed1d237d63b81e6e5db866d81f
|
|
BLAKE2b-256 checksum How to use checksums |
61a12e4c0228bb905d7cc01ace9ee43e5586192204b6b5d78725b8f35132dc30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.0 CPython/3.9.0 Windows/10
|