Skip to content

Commit 63235ed

Browse files
profcalculusKateFineganacsanygahjelle
authored
Rich showcase (#458)
* Create README.md * Add files via upload * Linter fixes * README LE * Update README.md * TR comments implemented * Fixed README to reference the JSON file * Rename directory * Final QA * Update imports * Rename final example --------- Co-authored-by: KateFinegan <[email protected]> Co-authored-by: Philipp Acsany <[email protected]> Co-authored-by: gahjelle <[email protected]>
1 parent b838b47 commit 63235ed

File tree

8 files changed

+953
-0
lines changed

8 files changed

+953
-0
lines changed

python-rich-package/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# The Python Rich Package: Unleash the Power of Console Text
2+
3+
This repository holds the sample code for the Real Python [showcase](https://realpython.com/python-rich-package).
4+
5+
## Dependencies
6+
7+
You should start by creating a virtual environment:
8+
9+
```console
10+
$ python -m venv venv
11+
$ source venv/bin/activate
12+
```
13+
14+
Next, install `rich` with `pip`:
15+
16+
```console
17+
(venv) $ python -m pip install rich
18+
```
19+
20+
The tutorial includes static sample data for the scrolling cryptocurrency table. This is also included in this repository as `crypto_data.json`.
21+
If you want to download your own fresh data, then you'll need the `requests` package:
22+
23+
```console
24+
(venv) $ python -m pip install requests
25+
```
26+
27+
The code to perform the download is in `get_crypto_data.py`. This demo code demonstrates a single request, which it then dumps to the screen. For a real-time application, you'd need to execute this request and process the data in a loop. The [CoinLore website](https://www.coinlore.com/cryptocurrency-data-api) doesn't impose rate limits, but they suggest making at most one request per second.
28+
29+
## Author
30+
31+
[Charles de Villiers](https://realpython.com/team/cdevilliers/)
32+
33+
## License
34+
35+
Distributed under the MIT license. See `LICENSE` in the root directory of this `materials` repo for more information.

0 commit comments

Comments
 (0)