Skip to main content

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


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)

Uploaded Source

Built Distribution

zimran_http-1.0.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

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

Hashes for zimran_http-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e446107d745cc9a63086f827f67a3c9034ce6819d08184c436a01096fe33e7b1
MD5 7328cd7d6441c1554ecce6a443ea80f7
BLAKE2b-256 14a05f76a738ad04df26c7fef44d5dd981570a0c310ee39b713db99e2165b205

See more details on using hashes here.

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

Hashes for zimran_http-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd946a52f7ded764f00c11ca97fa6f2501a0df937f4cba9517116fd0b101917e
MD5 173631b0949246e539639b5e7c3747fb
BLAKE2b-256 12daa6c19f29368e2ca2f9f2be69f24a58cc3d8ad8646bf305be6b7ef2bad2ac

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page