A cookiecutter-based project to stream data from liquidity pool1.
- Clone current repository:
git clone https://github.com/e183b796621afbf902067460/quickview-streaming.git
- Get into the project folder:
cd quickview-streaming/
- Set
WSS_NODE_PROVIDER
environment variable indocker-compose.yaml
.
- Create
venv
and activate it:
python3 -m venv venv && source venv/bin/activate
Project's dependencies are managed by the poetry2.
Moving to poetry has helped to have pyproject.toml
as a single configuration file for the whole project as well.
- Install
poetry
:
pip3 install poetry # 1.7.1
- And install project's dependencies:
poetry install --no-root
- If a new dependency have to be added, then it can be done this way, for example to add
fastapi
:
poetry add fastapi
- And lock it:
poetry lock --no-update
pre-commit3 is used to run pre-commit hooks.
All configurations are in the .pre-commit-config.yaml
.
To run commands below all dependencies have to be installed.
- To initialize hook:
pre-commit install
- To check all files, not only files in the commit:
pre-commit run --all-files
BOOTSTRAP_SERVERS
: Kafka application bootstrap servers.TOPIC_NAME
: Kafka application topic name.
WSS_NODE_PROVIDER
: WebSocket node provider.
- Run all in docker, perhaps using
sudo
:
docker-compose up -d --build --force-recreate
docker-compose down -v
Based on quickview-template5.