A smart wrapper over requests with built-in delays and headers.
Project description
smartrequests 🚀
A smart, lightweight wrapper over Python’s popular requests library — with built-in delays and a Googlebot-style user-agent to mimic human or bot-like behavior.
🔍 Why smartrequests?
Web crawling, scraping, and SEO testing often require:
- Respectful delays to avoid rate-limiting
- Realistic headers like search engine bots
- Simple, scriptable interface
smartrequests solves this with:
- ✅ Randomized delay per request
- ✅ Googlebot-style
User-Agent - ✅ Simple plug-and-play interface
- ✅ CLI support via
smartreqcommand
✨ Features
- 🕒 Auto-delay between requests (0.5s to 1.5s)
- 🕵️♂️ Custom
User-Agent:SmartBot/1.0 (like Googlebot) - 🔗 Drop-in replacement for
requests.Session() - 🔧 Command-line support (
smartreq <URL>) - 📦 Lightweight, no extra dependencies except
requests
📦 Installation
pip install smartrequests
⚙️ Usage (Python)
from smartrequests import SmartSession
session = SmartSession()
response = session.get("https://example.com")
print(response.status_code)
print(response.text[:500]) # Preview first 500 chars
🖥️ Usage (CLI)
smartreq https://example.com
Output:
[smartrequests] GET https://example.com (delay 0.92s)
200
<!DOCTYPE html> ...
📄 License
MIT License © 2025 Amal Alexander
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 smartrequests-0.1.1.tar.gz.
File metadata
- Download URL: smartrequests-0.1.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36a254b6d122cc90ba8dab3aff143c47188880dca36ef9d5d4755feb30b6f3b8
|
|
| MD5 |
8651b587109887d2b892c8879415ac6e
|
|
| BLAKE2b-256 |
c9d109ffe3bd88e7d30d47490651fc5eb420aff26df25eade0ee87a982fec660
|
File details
Details for the file smartrequests-0.1.1-py3-none-any.whl.
File metadata
- Download URL: smartrequests-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1e5494184e9bb5d734139f27d679f8af06d84c2ac40a13e6e354cc6a5b6cdac
|
|
| MD5 |
50705a8de7882b0af0d057bd252a0bfb
|
|
| BLAKE2b-256 |
79d42fd93bf769d4adef84eb71af5bc6f3715feec2cac7cff57c669fd6c349c4
|