Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imankulov/time-series-caching
Sample dashboard application to demonstrate practical time series caching with Python and Redis. The app shows a plot of all BTC transactions for a specific Bitcoin wallet in a specific date range.
https://github.com/imankulov/time-series-caching
elasticsearch plotly-dash python redis time-series
Last synced: 19 days ago
JSON representation
Sample dashboard application to demonstrate practical time series caching with Python and Redis. The app shows a plot of all BTC transactions for a specific Bitcoin wallet in a specific date range.
- Host: GitHub
- URL: https://github.com/imankulov/time-series-caching
- Owner: imankulov
- License: mit
- Created: 2021-10-27T09:55:23.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-27T11:17:19.000Z (about 3 years ago)
- Last Synced: 2024-10-12T07:32:51.834Z (about 1 month ago)
- Topics: elasticsearch, plotly-dash, python, redis, time-series
- Language: Python
- Homepage: https://roman.pt/posts/time-series-caching/
- Size: 55.7 KB
- Stars: 13
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Time series caching
Sample dashboard application to demonstrate practical time series caching with Python and Redis. The app shows a plot of all BTC transactions for a specific Bitcoin wallet in a specific date range.
![](./screenshot.png)
See [roman.pt/posts/time-series-caching/](https://roman.pt/posts/time-series-caching/) for more details and explanation of what's going on inside.
## How to get started
Create a new virtual environment with Python3.9 or newer and install the dependencies.
```shell
python3.9 -m venv env
source env/bin/activate
python -m pip install -r requirements.txt
```Create a new free account at https://www.anyblockanalytics.com/ that acts as the upstream data source.
Start a local Redis server with Docker compose:
```shell
docker-compose up
```Copy .env.sample to .env and update the file with ElasticSearch requisites.
```shell
cp .env.sample .env
edit .env
```Start a new cron job populating the cache in the background
```shell
python ./app.py cron
```Start a web server.
```shell
python ./app.py server
```Open the browser for the dashboard: http://127.0.0.1:8050/