Metadata-Version: 2.4
Name: smart-requests-ai
Version: 3.0.1
Summary: Python HTTP for Humans with AI Power.
Home-page: https://requests.readthedocs.io
Author: Kenneth Reitz & zinzied (AI Integration)
Author-email: me@kennethreitz.org
License: Apache-2.0
Project-URL: Documentation, https://requests.readthedocs.io
Project-URL: Source, https://github.com/psf/requests
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: charset_normalizer<4,>=2
Requires-Dist: idna<4,>=2.5
Requires-Dist: urllib3<3,>=1.21.1
Requires-Dist: certifi>=2017.4.17
Requires-Dist: google-generativeai
Provides-Extra: security
Provides-Extra: socks
Requires-Dist: PySocks!=1.5.7,>=1.5.6; extra == "socks"
Provides-Extra: use-chardet-on-py3
Requires-Dist: chardet<6,>=3.0.2; extra == "use-chardet-on-py3"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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.



```python

>>> 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:



```console

$ 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



---



[![Kenneth Reitz](https://raw.githubusercontent.com/psf/requests/main/ext/kr.png)](https://kennethreitz.org) [![Python Software Foundation](https://raw.githubusercontent.com/psf/requests/main/ext/psf.png)](https://www.python.org/psf)

