Metadata-Version: 2.4
Name: smartrequests
Version: 0.1.1
Summary: A smart wrapper over requests with built-in delays and headers.
Author: Amal Alexander
Author-email: amalalex95@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: requests
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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 `smartreq` command

---

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

```bash
pip install smartrequests
```

---

## ⚙️ Usage (Python)

```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)

```bash
smartreq https://example.com
```

**Output:**

```
[smartrequests] GET https://example.com (delay 0.92s)
200
<!DOCTYPE html> ...
```

---

## 📄 License

MIT License © 2025 Amal Alexander
