Band Protocol ETL CLI lets you convert Band Protocol data into JSON newline-delimited format.
Full documentation available here.
Install Band ETL CLI:
pip3 install band-etl
Export blocks, block_events, logs, messages, oracle_requests, transactions (Schema, Reference):
> bandetl export_blocks \
--start-block 1 \
--end-block 100 \
--provider-uri https://poa-api-backup2.bandchain.org \
--provider-uri-tendermint http://poa-q2.d3n.xyz:26657 \
--output-dir output
Stream blocks, block_events, logs, messages, oracle_requests, transactions to console (Reference):
> pip3 install band-etl[streaming]
> bandetl stream --start-block 500000 -e block,action,log --log-file log.txt \
--provider-uri https://poa-api-backup2.bandchain.org
Find other commands here.
For the latest version, check out the repo and call
> pip3 install -e .
> python3 bandetl.py
> pip3 install -e .[dev,streaming]
> export BAND_PROVIDER_URI=https://poa-api-backup2.bandchain.org
> pytest -vv
> pip3 install tox
> tox
-
Install Docker https://docs.docker.com/install/
-
Build a docker image
> docker build -t band-etl:latest . > docker image ls
-
Run a container out of the image
> docker run -v $HOME/output:/band-etl/output band-etl:latest export_blocks -s 1 -e 5499999 -b 1000 -o out
-
Run streaming to console or Pub/Sub
> docker build -t band-etl:latest -f Dockerfile . > echo "Stream to console" > docker run band-etl:latest stream --start-block 500000 --log-file log.txt > echo "Stream to Pub/Sub" > docker run -v /path_to_credentials_file/:/band-etl/ --env GOOGLE_APPLICATION_CREDENTIALS=/band-etl/credentials_file.json band-etl:latest stream --start-block 500000 --output projects/<your-project>/topics/mainnet