Python HTTP for Humans with AI Power.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 smart_requests_ai-3.0.1.tar.gz.
File metadata
- Download URL: smart_requests_ai-3.0.1.tar.gz
- Upload date:
- Size: 134.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f088a2a260ebd83d4df6dd1914d9a976495a3821fe95a93dbf2ddf4d28255f19
|
|
| MD5 |
89cc69f2d1b48d30feeb7733cca1ae74
|
|
| BLAKE2b-256 |
b7f9400bfdbc43ec6ebed5de4ca2cb0dcaf5c0cf49d3da3bea118f78803f8fec
|
File details
Details for the file smart_requests_ai-3.0.1-py3-none-any.whl.
File metadata
- Download URL: smart_requests_ai-3.0.1-py3-none-any.whl
- Upload date:
- Size: 67.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72b2aea206b4168cf5b29fc6ba7622ea2979e8b643792634374f9c000ad32265
|
|
| MD5 |
c9ac2d4b54898ce822ae1d748e70d37b
|
|
| BLAKE2b-256 |
b03610dc44816aa44bf576526bb1cd2282963aef8807bd44810ec6b723b020ac
|