Smart Requests AI (Integrated with AI)
Smart Requests AI is a simple, yet elegant, HTTP library, now enhanced with built-in AI capabilities.
A Note on Evolution & Innovation
We want to express our deepest gratitude to Kenneth Reitz and the entire Requests community for building and maintaining this incredible library for over a decade. It has truly been the "HTTP for Humans" backbone of Python.
As we look toward the future, we believe that integrating AI is no longer a luxury, but a necessity to manage the next wave of innovation. This version, maintained by zinzied, introduces native AI power to the classic Requests interface, ensuring that our tools evolve as fast as the technology they power. It is time to manage the innovation of tomorrow, today.
>>> import smart_requests as requests
>>> # Initialize AI features
>>> requests.ai.configure(key='YOUR_GEMINI_API_KEY')
>>>
>>> r = requests.get('https://httpbin.org/get')
>>> # Use AI to extract structured data
>>> data = r.ai.extract("Extract any meaningful metadata from this page")
>>>
>>> # Analyze error responses
>>> r_err = requests.get('https://httpbin.org/status/404')
>>> print(r_err.ai.analyze())
Requests allows you to send HTTP/1.1 requests extremely easily. There’s no need to manually add query strings to your URLs, or to form-encode your PUT & POST data — but nowadays, just use the json method!
AI-Powered Features
Smart Requests includes a native ai proxy on both Response and Session objects:
-
Response.ai.extract(prompt, schema=None): Extract structured information from response body using AI. -
Response.ai.analyze(): Get a human-readable analysis of the response, including fix suggestions for errors. -
Session.ai.humanize(): Automatically adjust session headers to mimic a real browser behavior using AI-generated profiles.
Installing Smart Requests AI
Smart Requests AI is available on PyPI:
$ python -m pip install smart-requests-ai
Supported Features & Best–Practices
Smart Requests is ready for the demands of building robust and reliable HTTP–speaking applications, for the needs of today.
-
Integrated Google Gemini AI support
-
Keep-Alive & Connection Pooling
-
International Domains and URLs
-
Sessions with Cookie Persistence
-
Browser-style TLS/SSL Verification
-
Basic & Digest Authentication
-
Familiar
dict–like Cookies -
Automatic Content Decompression and Decoding
-
Multi-part File Uploads
-
SOCKS Proxy Support
-
Connection Timeouts
-
Streaming Downloads
-
Automatic honoring of
.netrc -
Chunked HTTP Requests
Metadata
Release files for smart-requests-ai 3.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| smart_requests_ai-3.0.1.tar.gz | 134.5 kB | Without provenance | Details for smart_requests_ai-3.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| smart_requests_ai-3.0.1-py3-none-any.whl | Python 3 | none | any | Details for smart_requests_ai-3.0.1-py3-none-any.whl |
Total release size: 202.0 kB
Release files / smart_requests_ai-3.0.1.tar.gz
| Download URL | smart_requests_ai-3.0.1.tar.gz |
|---|---|
| Size | 134.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f088a2a260ebd83d4df6dd1914d9a976495a3821fe95a93dbf2ddf4d28255f19
|
|
BLAKE2b-256 checksum How to use checksums |
b7f9400bfdbc43ec6ebed5de4ca2cb0dcaf5c0cf49d3da3bea118f78803f8fec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / smart_requests_ai-3.0.1-py3-none-any.whl
| Download URL | smart_requests_ai-3.0.1-py3-none-any.whl |
|---|---|
| Size | 67.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72b2aea206b4168cf5b29fc6ba7622ea2979e8b643792634374f9c000ad32265
|
|
BLAKE2b-256 checksum How to use checksums |
b03610dc44816aa44bf576526bb1cd2282963aef8807bd44810ec6b723b020ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for smart-requests-ai 3.0.1
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.