TrendScout
Real-time trend intelligence — HackerNews search, RSS feed parsing, trend velocity scoring, and multi-domain sentiment analysis. No API key required.
Installation
pip install trendscout
Quick Start
from trendscout import TrendScout
ts = TrendScout()
# Real HackerNews data — no API key needed
df = ts.get_hackernews_trends("AI agents", limit=10)
print(df[['title', 'score', 'num_comments']].head())
# Sentiment with market signal
result = ts.analyze_sentiment("GPT-5 crushes every benchmark!", domain="tech")
print(result)
# Trend velocity
velocity = ts.get_trend_velocity("rust programming language")
print(velocity)
Features at a Glance
| Feature | Description |
|---|---|
| HackerNews API | Real stories via Algolia — free, no key, always fresh |
| RSS/Atom Feeds | Tech, AI, business, Python presets + custom URLs |
| Trend Velocity | Momentum score 0–1 with status: emerging/peak/stable/declining |
| Sentiment Analysis | TextBlob + domain-aware lexicons (financial, tech, social) |
| Multi-topic Analysis | Compare topics side-by-side in a ranked DataFrame |
| DataFrame Batch | Bulk sentiment analysis on any text DataFrame |
HackerNews Trends (Real Data)
from trendscout import TrendScout
ts = TrendScout()
# Search by keyword — uses HN Algolia API
df = ts.get_hackernews_trends("large language models", limit=20)
print(df[['title', 'score', 'num_comments', 'author']].head(5))
# title score num_comments author
# 0 LLMs are now good enough for production use 847 312 pg
# 1 Show HN: Open-source LLM benchmark suite 412 189 teyfikoz
# ...
# Top stories right now
from trendscout.sources.hackernews import HackerNewsSource
hn = HackerNewsSource()
top = hn.get_top_stories(limit=10)
for story in top:
print(f"[{story.score:4d}] {story.title[:70]}")
RSS / Atom Feed Parsing
ts = TrendScout()
# Preset categories: tech | ai | business | python | startup
tech_news = ts.get_rss_trends(category="tech", limit=15)
ai_news = ts.get_rss_trends(category="ai", limit=10)
print(tech_news[['title', 'published', 'feed_name']].head())
# Custom feed URLs
custom = ts.get_rss_trends(
feeds=[
"https://feeds.hnrss.org/newest?points=100",
"https://planetpython.org/rss20.xml",
],
limit=20,
)
Trend Velocity Scoring
velocity = ts.get_trend_velocity("quantum computing")
print(velocity)
# Trend : quantum computing
# Velocity: [████████░░░░░░░░░░░░] 0.42
# Status : PEAK
# Articles: 12 | Avg engagement: 156
# → Trending now — maximise exposure before it plateaus
# Status meanings:
# emerging (0.70–1.00) — fast-growing, act now
# peak (0.40–0.70) — trending, maximise reach
# stable (0.15–0.40) — evergreen, good for long-form
# declining (0.00–0.15) — losing momentum, pivot keywords
Multi-Topic Comparison
report = ts.analyze_topics(
["AI agents", "blockchain", "quantum computing", "WebAssembly", "Rust"],
source="hackernews",
)
print(report.to_string(index=False))
# topic velocity_score status article_count avg_engagement
# AI agents 0.87 emerging 24 312.4
# Rust 0.64 peak 18 198.2
# quantum computing 0.42 peak 12 156.1
# blockchain 0.21 stable 8 89.3
# WebAssembly 0.09 declining 4 42.0
Sentiment Analysis
# General sentiment
result = ts.analyze_sentiment("The product launch exceeded all expectations.")
print(result.label) # positive
print(result.intensity) # strong
print(result.polarity) # 0.625
# Financial domain (detects bullish/bearish signals)
fin = ts.analyze_sentiment("Revenue surged 40% beating analyst estimates.", domain="financial")
print(fin.market_signal) # bullish
print(fin.confidence) # 0.92
# Tech news domain
tech = ts.analyze_sentiment("Critical vulnerability found in popular library.", domain="tech")
print(tech.market_signal) # bearish
print(tech.label) # negative
Batch DataFrame Analysis
import pandas as pd
headlines = pd.DataFrame({
'headline': [
"OpenAI releases new model beating GPT-4",
"Tech stocks plunge amid regulatory fears",
"Startup raises $50M Series B for AI platform",
"Security breach affects millions of users",
]
})
result = ts.analyze_dataframe(headlines, text_col="headline", domain="financial")
print(result[['headline', 'sentiment_label', 'market_signal', 'polarity']])
Direct Source Access
from trendscout.sources.hackernews import HackerNewsSource
from trendscout.sources.rss import RSSFeedSource
# HackerNews
hn = HackerNewsSource()
stories = hn.search("python async", limit=5)
for s in stories:
print(f"[{s.score}] {s.title}")
# RSS
rss = RSSFeedSource()
items = rss.fetch("https://feeds.hnrss.org/newest?points=100", limit=5)
for item in items:
print(item.title)
Full Intelligence Pipeline
from trendscout import TrendScout
ts = TrendScout()
topics = ["AI agents", "edge computing", "Web3", "open source LLMs"]
# 1. Velocity comparison
report = ts.analyze_topics(topics)
# 2. Fetch real articles for the top trend
top_topic = report.iloc[0]['topic']
articles = ts.get_hackernews_trends(top_topic, limit=20)
# 3. Batch sentiment on the articles
enriched = ts.analyze_dataframe(articles, text_col="title", domain="tech")
# 4. Summary
bullish_count = (enriched['market_signal'] == 'bullish').sum()
print(f"Top trend: {top_topic}")
print(f"Velocity: {report.iloc[0]['velocity_score']:.2f} ({report.iloc[0]['status']})")
print(f"Positive articles: {bullish_count}/{len(enriched)}")
License
MIT — Teyfik Öz
Metadata
Release files for trendscout 1.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 | Provenance | Actions |
|---|---|---|---|---|
| trendscout-1.1.0.tar.gz | 15.6 kB | Without provenance | Details for trendscout-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trendscout-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for trendscout-1.1.0-py3-none-any.whl |
Total release size: 29.5 kB
Release files / trendscout-1.1.0.tar.gz
| Download URL | trendscout-1.1.0.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15dcd5d0fc19bb4af5a0b2344e1a9665c867e50d1b8a85fc2bff388dd955639b
|
|
BLAKE2b-256 checksum How to use checksums |
1b487e2300570e07b7046d1ee37a808f408ebee1a110149e82dc500805a8f259
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / trendscout-1.1.0-py3-none-any.whl
| Download URL | trendscout-1.1.0-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84e92054780b01657b0bf82c11e22483f816be05db7711821a9e9e3dcc95e17e
|
|
BLAKE2b-256 checksum How to use checksums |
96ddaf3d579d30f6dc771251b926d64e6982a046c04655b3c6520f3ac3897a5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for trendscout 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.