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.1.0.tar.gz (6.4 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.1.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for xrequest-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f790f80ec2727c0ef749f8f461a4b8c2b7053ef3ceb96d563f060058f02a215b
MD5 4aa0d25bd467643ff35e4eb88d452c5a
BLAKE2b-256 94d2740bef894fb9f9145b1b23774f2c75f4254cde73be1f8f8b8b9e7be2bf4b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xrequest-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f08b31655dadde7ff0305ddf6981e707fbe636a4cba5fa3b28e8e068fc5f431
MD5 e96ea88d60e663e138e0d8b93e9b1e4f
BLAKE2b-256 c92be7961a5514266e1c86efa0b107228cf8da11f07f0aa29b20ad4103957f0c

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