fear-and-greed
Python wrapper for CNN Fear & Greed Index.
What it is and what it does
fear-and-greed is a lightweight Python wrapper that scrapes CNN's Fear & Greed Index from their website and returns the current market sentiment metric as a structured named tuple. It wraps the web-scraping logic around requests and requests-cache, caching results locally for 1 minute to avoid repeated fetches.
The package is designed for developers who want programmatic access to CNN's Fear & Greed Index without building their own scraper. It returns three pieces of data: the numeric index value, a human-readable category label (ranging from "Extreme Fear" to "Extreme Greed"), and the UTC timestamp of the last update on CNN's site. However, the package has not been maintained since May 2022, so its scraper may fail if CNN's website structure has changed.
Use it for:
- Fetch the current Fear & Greed Index value in a financial dashboard or monitoring application.
- Log historical sentiment readings at intervals for trend analysis or backtesting trading strategies.
- Alert traders or analysts when the index crosses into extreme fear or greed territory.
- Combine with other market data sources to build a multi-factor sentiment analysis tool.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Fetches CNN's Fear & Greed Index from their website, parses the current value, and returns it as a named tuple with the index value, category description, and last update timestamp.
Yes, if you need quick programmatic access to CNN's Fear & Greed Index and are willing to accept the risk that the scraper may break due to site changes. The low install friction and permissive license make it a low-cost experiment. No, if you require active maintenance or a guaranteed working solution—the package is abandoned and has not been updated since May 2022. Test it first to confirm the scraper still works with the current CNN website.
Install
fear-and-greed on PyPI
pip
pip install fear-and-greeduv
uv add fear-and-greedpoetry
poetry add fear-and-greedInstalling fear-and-greed
Before you install
Low install friction with only two runtime dependencies (requests and requests-cache). However, the package is abandoned—last updated May 2022—so no maintenance or bug fixes should be expected going forward.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute the package freely with minimal restrictions.
Quickstart
pip install fear-and-greed
import fear_and_greed
result = fear_and_greed.get()
print(result.value, result.description, result.last_update)
CNN's website structure may have changed since the last release in May 2022; the scraper may no longer work if the page layout has been updated.
Verify before relying
- Whether the web scraper still successfully parses CNN's Fear & Greed Index page given potential site structure changes since May 2022.
- Whether the 1-minute cache duration for requests is still appropriate for current use cases.
- The range of the index value (description mentions it falls into categories from 'Extreme Fear' to 'Extreme Greed').
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — requests, requests-cache |
| Maintenance | abandoned — 1,547 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 90,405/month — #13,587 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fear_and_greed-0.4-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
yfinanceFetches financial and market data from Yahoo…
permissive · top 1,000 on PyPI
finance-datareaderFetches historical and current financial…
permissive · top 15,000 on PyPI
tushareFetches historical and real-time Chinese stock…
permissive · top 15,000 on PyPI
investor-agentProvides financial research tools as an MCP…
permissive · top 15,000 on PyPI
baostockBaoStock retrieves historical China stock…
permissive · top 15,000 on PyPI
alpha-vantageFetches real-time and historical stock,…
permissive · top 15,000 on PyPI
tradingview-screenerQuery TradingView's screener API to retrieve…
permissive · top 15,000 on PyPI
efinanceFetches historical and real-time stock, fund,…
permissive · top 15,000 on PyPI
vnaiVnAI provides a Python interface for accessing…
unclear · top 15,000 on PyPI
mootdxReads market data from Tongdaxin (a Chinese…
permissive · top 15,000 on PyPI