Skip to main content

Python wrapper for CNN's Fear & Greed Index.

Fetches CNN's website, parses the index value and returns the data as a three-element tuple.

Installation

pip install fear-and-greed

Usage example

import fear_and_greed

fear_and_greed.get()

Returns a three-element namedtuple with (a) the current value of the Fear & Greed Index, (b) a description of the category into which the index value falls (from "Extreme Fear" to "Extreme Greed") and (c) the timestamp at which the index value was last updated on CNN's website. Example:

FearGreedIndex(
    value=31.4266,
    description='fear',
    last_update=datetime.datetime(2022, 4, 25, 16, 51, 9, 254000, tzinfo=datetime.timezone.utc)),
 )

Requests to CNN's website are locally cached for 1m.

Test workflow PyPI badge Black badge

Release files for fear-and-greed 0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fear-and-greed 0.4
File Size Uploaded
fear-and-greed-0.4.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fear-and-greed 0.4
File Interpreter ABI Platform
fear_and_greed-0.4-py3-none-any.whl Python 3 none any Details

Total release size: 7.3 kB

Release files / fear-and-greed-0.4.tar.gz

Download URL fear-and-greed-0.4.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d997f049180442ca4bc33518e9d3b5b8fd140151de81826e78743eceb373ea1c
BLAKE2b-256 checksum
How to use checksums
757e5e2da52822046c0c42ac2a71bf33e7a3ebdcdb48987757a825a2db4644ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / fear_and_greed-0.4-py3-none-any.whl

Download URL fear_and_greed-0.4-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f15fbd3ce89762c15d8649b56e43acaa16424c9c5013efa896d61a3d7f863386
BLAKE2b-256 checksum
How to use checksums
4abecbcdc55b93bb7207a63015ad21a5fd7697f7010657c9d2aab8d70310c740
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release history Release notifications | RSS feed

This release

0.4 This release

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page