lowhaio-chunked 
Chunked transfer request encoding for lowhaio. This is only needed if content-length is unknown before the body starts to transfer.
Installation
pip install lowhaio lowhaio_chunked
or just copy and paste the below 8 lines of code into your project, ensuring to also follow the requirements in the LICENSE file.
def chunked(body):
async def _chunked(*args, **kwargs):
async for chunk in body(*args, **kwargs):
yield hex(len(chunk))[2:].encode() + b'\r\n'
yield chunk
yield b'\r\n'
yield b'0\r\n\r\n'
return _chunked
Usage
Usage is very similar to standard lowhaio, except that the body data should be wrapped with the chunked function; the transfer-encoding: chunked header is required; and the content-length header should not be specified.
So instead of a request like
from lowhaio import Pool
request, _ = Pool()
body = ...
code, headers, body = await request(
b'POST', 'https://example.com/path', body=body,
headers=((b'content-length', b'1234'),),
)
you can write
from lowhaio import Pool
from lowhaio_chunked import chunked # Or paste in the code above
request, _ = Pool()
body = ...
code, headers, body = await request(
b'POST', 'https://example.com/path', body=chunked(body),
headers=((b'transfer-encoding': b'chunked'),),
)
Metadata
Release files for lowhaio-chunked 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lowhaio_chunked-0.0.5.tar.gz | 1.9 kB | Without provenance | Details for lowhaio_chunked-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lowhaio_chunked-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for lowhaio_chunked-0.0.5-py3-none-any.whl |
Total release size: 4.9 kB
Release files / lowhaio_chunked-0.0.5.tar.gz
| Download URL | lowhaio_chunked-0.0.5.tar.gz |
|---|---|
| Size | 1.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eee28e1dabd2babd17ba5170d090fc85a5aece6d9ee9e73a0323f80327543f30
|
|
BLAKE2b-256 checksum How to use checksums |
efe2c2d2ffd33e90ae762c8cd8c6041ac7cad4a64ae0d06580419a047c3c419a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
|
Release files / lowhaio_chunked-0.0.5-py3-none-any.whl
| Download URL | lowhaio_chunked-0.0.5-py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b3f0f7e90b734227d2d9c372e9b510829ae6879704e34f09b8c6eccc6597d61d
|
|
BLAKE2b-256 checksum How to use checksums |
ba08948be700acec606e21c05bce2809b195611ec44f922262ef8c07cb16a135
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
|
Security for lowhaio-chunked 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.