Chronicle
The web scraping library that remembers.
Chronicle is a data-science-native web scraping framework with temporal versioning and drift detection built in. Every scrape is stored, profiled, and compared to history — so you know exactly when your data changes and why.
Why Chronicle?
Existing scraping libraries hand you raw data and walk away. Chronicle remembers.
| Tool | Strength | The gap Chronicle fills |
|---|---|---|
| Requests | HTTP requests | No parsing, no structure |
| BeautifulSoup | HTML parsing | No fetching, no data quality |
| Scrapy | Large-scale crawling | No drift detection, no reproducibility |
| Selenium | JS-rendered pages | No data pipeline, no versioning |
| lxml | Fast parsing | No fetching, no schema |
Chronicle sits on top of these tools and adds the layer data scientists actually need:
- 🕐 Temporal versioning — every scrape is stored, versioned, and replayable
- 🔍 Drift detection — catch broken selectors before they poison your pipeline
- 📊 DataFrame-native — one line from URL to analysis-ready data
- 📜 Reproducible — every run produces a self-contained artifact
- ✅ Schema validation — data quality enforced at scrape time
- 🧠 DS-first design — built for Jupyter, pandas, and real pipelines
Install
pip install chronicle-ds
Chronicle requires Python 3.10+.
Quickstart
from chronicle import Scrape
df = Scrape("https://example.com/products").to_dataframe()
print(df.head())
More Control
from chronicle import Scrape
df = Scrape(
url="https://example.com/products",
selectors={
"_container": "div.product",
"name": "h2",
"price": "span.price",
"rating": "span.rating",
},
pages=5,
rate_limit=2.0,
).to_dataframe()
The Core Idea
Chronicle treats every scrape as a versioned event. This unlocks two things no other scraping library provides:
1. Temporal Versioning
Every run is stored with:
- Raw HTML
- Parsed data (Parquet)
- Statistical profile
- Run metadata (timestamps, config, library version)
# Query the full history of a scraper
history = Scrape.history("https://example.com/products")
history.drift_timeline()
2. Drift Detection
Chronicle compares each new run against a baseline and detects:
- Schema drift — columns added, removed, or renamed
- Null drift — fields suddenly returning
None - Distribution drift — mean, median, or variance shifts
- Range drift — values outside historical bounds
- Selector health — selectors returning zero elements
result = Scrape("https://example.com/products").run()
if result.drift_detected:
print(result.drift_report())
# ⚠️ price null% jumped from 0.02 → 0.98 (selector likely broken)
Status
🚧 Early development. v0.1.0 in progress.
What's built
- HTTP layer (
fetch.py) — retries, rate limiting, caching - HTML parsing (
parse.py) - Schema validation (
normalize.py) -
Scrapeclass (core.py) - Storage + versioning (
storage.py) - Profile generator (
profile.py) - Drift detection (
drift.py)
Roadmap
- Data contracts (schema + quality guarantees)
- Reproducibility artifacts
- Self-healing selectors
- Playwright support for JS-rendered pages
- CLI + recipe system
Contributing
Chronicle is in early, fast-moving development. Issues, ideas, and PRs are welcome.
git clone git@github.com:TheDataNormad/chronicle.git
cd chronicle
python -m venv .venv
source .venv/Scripts/activate # Windows
pip install -e ".[dev]"
pytest
License
MIT — see LICENSE.
Author
Built by @TheDataNormad.
Metadata
Release files for chronicle-ds 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chronicle_ds-0.1.0.tar.gz | 20.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chronicle_ds-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.2 kB
Release files / chronicle_ds-0.1.0.tar.gz
| Download URL | chronicle_ds-0.1.0.tar.gz |
|---|---|
| Size | 20.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b09d3d17a012455018d00fd4553b83cda4481ea5b636fa48ab2faf5bae6714ba
|
|
BLAKE2b-256 checksum How to use checksums |
91618894f8798277ba56fdc29f6ab36da7b88b9a9b9289cca70853f8398ca5ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / chronicle_ds-0.1.0-py3-none-any.whl
| Download URL | chronicle_ds-0.1.0-py3-none-any.whl |
|---|---|
| Size | 21.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3bc5ffbdc0b743aa023be4e618b669ad063650b012ff46994a847eca89fef140
|
|
BLAKE2b-256 checksum How to use checksums |
a39cb648e7742ea12e39b858c43ba000d6eb85b7bd95fa8edb7814adf4382c6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|