Installation
These docs cover news-fetch 1.1.0 (PyPI).
Requires Python 3.11+ (3.10 reached end of life in October 2026).
From PyPI
pip install "news-fetch==1.1.0"
# or latest 1.x:
pip install "news-fetch>=1.1.0"
Optional extras
pip install news-fetch[async] # httpx-powered async fetch
pip install news-fetch[browser] # Playwright render / fallback
# then for browser:
playwright install chromium
Disk cache (stdlib SQLite) and respect_robots (built-in RFC 9309 parser) are part of the core package — no extra install required.
From source
git clone https://github.com/santhoshse7en/news-fetch.git
cd news-fetch
pip install .
Development
Development uses uv with a committed uv.lock. Dev tools live in a PEP 735 [dependency-groups] table.
uv sync # .venv with the package + dev dependency group, pinned by uv.lock
uv run pytest
uv run ruff check .
uv run python benchmarks/run_benchmark.py
uv build # sdist + wheel into dist/
Removed in 1.1.0: the
pip install news-fetch[dev]extra and therequirements*.txtfiles no longer exist. Useuv sync.
Dependencies
Core (kept intentionally small):
| Package | Role |
|---|---|
lxml |
HTML parsing |
cssselect |
CSS selectors (a missing install now raises instead of silently matching nothing) |
requests |
Sync HTTP |
python-dateutil |
Date parsing |
Not in core: newspaper4k, BeautifulSoup, NLTK, Playwright, Pydantic.
CLI
Installing the package registers the news-fetch console script:
news-fetch --version