-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rich showcase #458
Rich showcase #458
Conversation
Source files and Jupyter notebook for the Rich showcase article.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @profcalculus,
thanks for providing the materials. I left you a few comments below.
Also, I was wondering if we really need the Jupyter notebook as a "replica" of the tutorial. But I leave this up to you 🙂
rich_showcase/README.md
Outdated
```console | ||
(venv) $ python -m pip install requests | ||
``` | ||
The code to perform the download is in get_rich_showcase_data.py. This demo code demonstrates a single request, which it then dumps to the screen; for a real-time application you would 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 one request per second. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code to perform the download is in get_rich_showcase_data.py. This demo code demonstrates a single request, which it then dumps to the screen; for a real-time application you would 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 one request per second. | |
The code to perform the download is in `get_rich_showcase_data.py`. This demo code demonstrates a single request, which it then dumps to the screen; for a real-time application you would 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 one request per second. |
rich_showcase/dynamic_status.py
Outdated
time.sleep(10) | ||
for _ in range(10): | ||
print() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
time.sleep(10) | |
for _ in range(10): | |
print() |
rich_showcase/rich_showcase_table.py
Outdated
from rich.table import Table | ||
from rich.live import Live | ||
from rich.console import Console | ||
from rich_showcase_data import DEMO_DATA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make it more clear, you could consider changing rich_showcase_data.py
into a JSON file and import this one into a DEMO_DATA
dictionary.
Co-authored-by: Philipp Acsany <[email protected]>
Co-authored-by: Philipp Acsany <[email protected]>
Hi @acsany , I removed the .ipynb file and revised the table to read a JSON file as you suggested. Should be ready to go now?! |
Where to put new files:
my-awesome-article
How to merge your changes: