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.2.1.tar.gz
(6.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xrequest-0.2.1.tar.gz.
File metadata
- Download URL: xrequest-0.2.1.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cd6a3e8dfb4ec103f1f576cd885297129746cc27ae291ac529da5fcffb47a05
|
|
| MD5 |
a19adabd601a28af6808da0614b03251
|
|
| BLAKE2b-256 |
aa0d171e8a071aedae7580d28dab6a48c95f11223e3abdf6be37ee44d6ccea40
|
File details
Details for the file xrequest-0.2.1-py3-none-any.whl.
File metadata
- Download URL: xrequest-0.2.1-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff3ece5a8d9d6541c48a71b70d948721ef5d714589573cf789f18589c64521bc
|
|
| MD5 |
d47ef36974faad5465c217a2c503951f
|
|
| BLAKE2b-256 |
301788f71209f4146a8033c9110202cf70427b90ce1a3de09e17cf89d01cc226
|