semvec/pypi-packages huggingface dataset:
fear-and-greed 0.4
Python wrapper for CNN Fear & Greed Index.
Requires Python: >=3.0

Python wrapper for CNN's [Fear & Greed Index](https://money.cnn.com/data/fear-and-greed/).

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

# Installation

```bash
pip install fear-and-greed
```

# Usage example

```python
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:

```python
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](https://pypi.org/project/requests-cache/) for 1m.

[![Test workflow](https://github.com/vterron/fear-and-greed/actions/workflows/test.yml/badge.svg)](https://github.com/vterron/fear-and-greed/actions/workflows/test.yml)
[![PyPI badge](https://img.shields.io/pypi/v/fear-and-greed?color=blue)](https://pypi.org/project/fear-and-greed/)
[![Black badge](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
jsonreadwrite 1.0.0
A package to read and write json files
Requires Python: >=3.9

# Read Write JSON
### Load JSON Settings from file
### Write JSON Settings to file


```
- Read settings file from json format and return it
- Write settings file from json format
- Interactive write in json settings with save option
- Write out json file if file is missing
    - values
        - string, int, float
        - [list], {"dict":"value"}
```

```
pip install jsonreadwrite
```

Todo: Write proper documentation
```python
from jsonreadwrite import JsonReadWrite

testlist = ["test1", "test2", "test3"]
testdict = {"test1": "test1", "test2": "test2", "test3": "test3"}
testint = 1
testfloat = 1.1
testbool = True
testnone = None
testblank = ""

test = JsonReadWrite("test.json",allowempty=True)

test.set("testlist", testlist)
test.set("testdict", testdict)
test.set("testint", testint)
test.set("testfloat", testfloat)
test.set("testbool", testbool)
test.set("testnone", testnone)
test.set("testblank", testblank)

assert test.get("testlist") == testlist
assert test.get("testdict") == testdict
assert test.get("testint") == testint
assert test.get("testfloat") == testfloat
assert test.get("testbool") == testbool
assert test.get("testnone") == testnone
assert test.get("testblank") == testblank
```

```json
{
      "testlist": [
            "test1",
            "test2",
            "test3"
      ],
      "testdict": {
            "test1": "test1",
            "test2": "test2",
            "test3": "test3"
      },
      "testint": 1,
      "testfloat": 1.1,
      "testbool": true,
      "testnone": null,
      "testblank": ""
}
```
greads 0.7
Command-line tool to scrape quotes from Goodreads

# Goodreads Quotes Scraper


## Requirements
- [python>=3.6](https://www.python.org/downloads/)

## Installation

```sh
pip install greads
```

## Usage

```sh
greads --help
```

```
usage: greads [-h] -a AUTHOR [-l LANGUAGE] [-n NUM_PAGES] [-o OUTPUT_FILE]
            [--enable-multiprocessing]

optional arguments:
  -h, --help            show this help message and exit
  -a AUTHOR, --author AUTHOR
                        Full name of the author you want to search
  -l LANGUAGE, --language LANGUAGE
                        Two letters string representing the language you want
                        to parse the results in (default: en)
  -n NUM_PAGES, --num-pages NUM_PAGES
                        Number of pages to iterate through (if empty, will
                        iterate through all pages)
  -o OUTPUT_FILE, --output-file OUTPUT_FILE
                        Name of the output file (default: quotes.json)
  --enable-multiprocessing
                        Enable multiprocessing
```


## Example


```sh
greads --author "Oscar Wilde" --num-pages 100
# 100%|█████████████████████████████████████████| 100/100 [01:06<00:00,  1.49it/s]
# Cleaning the quotes text...
# Saved results to quotes.json...
```

```sh
greads --author "Oscar Wilde" --num-pages 10 --language 'es'
# 100%|███████████████████████████████████████████| 10/10 [00:06<00:00,  1.60it/s]
# Cleaning the quotes text...
# Saved results to quotes.json...
```