Metadata-Version: 2.5
Name: uaid
Version: 0.1.0
Summary: Identify crawlers and bots by user agent with plain substring matching
Project-URL: Repository, https://github.com/tn3w/uaid
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: ai-crawler,anti-bot,bot,bot-detection,crawler,crawler-detection,googlebot,reverse-dns,robots,scraper-detection,seo,spider,user-agent,user-agent-parser,web-scraping
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet :: Log Analysis
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Security
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# uaid

Identify crawlers and bots by user agent. Plain substring matching, no regex, no dependencies.

```
pip install uaid
```

```python
import uaid

uaid.is_bot("curl/8.4.0")  # True

uaid.identify("Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)")
# {'description': 'Google search indexing bot', 'tags': ['search-engine'], 'url': ..., 'rdns': [...]}
```

- `is_bot` checks ~2900 known crawlers plus a keyword heuristic for unknown bots
  (~94% recall, ~0.1% false positives on 30k real browser user agents).
- `identify` returns the most specific known crawler, or `None`.
- `rdns` lists forward-confirmed reverse DNS suffixes for verifying a crawler's IP.

## Data

`crawlers.json` is the source database. Each `match` rule is tested against the lowercased
user agent: a string must be contained, a leading `^` anchors it to the start, a nested
list requires all parts. The wheel ships a compact, pre-sorted version generated at build
time.
