Skip to main content

HTTPlus

An HTTP asynchronous client.

Stable Version

Instalation

pip install httplus

Basic Usage

The simplest request using get method is showed below.

import httplus
...
client = httplus.Client()
res = await client.get('http://someserver/api/collection')
print(res.status)
# 200
data = res.json()
# {...}

A request is executed by Client instance class. The Client class has get, post, put, delete, options, patch and head methods to do requests.

Examples

Sending data through POST request

import httplus
...
data = {
    'name': 'Vink',
    'surname': 'Blaster'
}
client = httplus.Client()
res = await client.post('http://someserver/api/customers', data=data)
print(res.status)
# 200

The data parameter can be a dict, list or a binary object. A dict or a list passed by data param will be interpreted like JSON format data. If a binary data like a pdf or an image file is been sending, a header content mime type need to be informed by headers param.

import httplus
...
image = b'<some_image_binary>'
headers = {
    'Content-Type': 'image/png'
}
url = 'http://someserver/api/books'
...
client = httplus.Client()
res = await client.post(url=url, data=image, headers=headers)
print(res.status)
# 200

Metadata

Release files for httplus 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for httplus 0.1.2
File Size Uploaded Provenance Actions
httplus-0.1.2.tar.gz 4.1 kB Without provenance Details for httplus-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for httplus 0.1.2
File Interpreter ABI Platform Actions
httplus-0.1.2-py3-none-any.whl Python 3 none any Details for httplus-0.1.2-py3-none-any.whl

Total release size: 9.2 kB

Release files / httplus-0.1.2.tar.gz

Download URL httplus-0.1.2.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
957a61a2fe93186bb0217f6ab1980732a995337b51254ba242d3538d4fbbb705
BLAKE2b-256 checksum
How to use checksums
03cfea8e718ed761c7558a7c83cd0aaa2a56c6c72a466cfedbc3692e3ee3d69d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.10.6 Linux/5.19.0-46-generic

Release files / httplus-0.1.2-py3-none-any.whl

Download URL httplus-0.1.2-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e305d178dca09040207101ccc88ebc7f67531ec19debcecdcd67ae41e1743c66
BLAKE2b-256 checksum
How to use checksums
f8e03f4f241ecc3d3187f5069e928d9db87bdb9202c3c43dd43ef950db96f982
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.10.6 Linux/5.19.0-46-generic

Security for httplus 0.1.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page