Skip to main content

Simple httpx for lazy people

Project description

xrequest

Simple library for asynchronous HTTP requests.

Installation

pip install xrequest

Usage

Without Session

import xrequest

response = await xrequest.get("https://api.example.com")

With Session (reuse connection)

import xrequest

session = xrequest.Session()
try:
    response = await.session.get("https://api.example.com")
finally:
    await session.close()

For now, request is a library that only works for async functions.

values

´´´ async def get( url: str | list, timeout: int = 5, headers: dict | None = None, follow_redirects: bool = True, retries: int = 0, session: bool | None = None): ´´´

License

MIT

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

xrequest-0.0.6.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xrequest-0.0.6-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file xrequest-0.0.6.tar.gz.

File metadata

  • Download URL: xrequest-0.0.6.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for xrequest-0.0.6.tar.gz
Algorithm Hash digest
SHA256 5f244538475a81aae29604b37ba1a6327a14bc9d2a28fc6abcc37bca4d1131db
MD5 fcb9cb2b2b9fe64c65a6acd7bad1e0a1
BLAKE2b-256 eace526d0cb1a47f6c0b69c98d6bf96ee3c6e1e3c8bb035cb32d3dfc5023a2f1

See more details on using hashes here.

File details

Details for the file xrequest-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: xrequest-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for xrequest-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 24ffc9f63a7af9435676d415fe571f9278d2ff3f39a7db65018bf825c7abbdc9
MD5 8898d617c3236d0f1c48442d99b6fd7f
BLAKE2b-256 c6b9efd96eaac2be5c559b661ccbdc160b7efd93caf79ccccf8a62571ed4f55e

See more details on using hashes here.

Supported by

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