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.
Metadata
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)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| fear-and-greed-0.4.tar.gz | 3.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|
Security for fear-and-greed 0.4
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.