Skip to main content

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


Kenneth Reitz Python Software Foundation

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)

Source distribution for smart-requests-ai 3.0.1
File Size Uploaded
smart_requests_ai-3.0.1.tar.gz 134.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for smart-requests-ai 3.0.1
File Interpreter ABI Platform
smart_requests_ai-3.0.1-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

3.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page