semvec/pypi-packages huggingface dataset:
band-etl 1.0.0
Tools for exporting Band Protocol blockchain data to JSON
Requires Python: >=3.6.0,<3.8.0
Keywords: Band Protocol

# Band Protocol ETL CLI

[![Build Status](https://travis-ci.org/blockchain-etl/band-protocol-etl.svg?branch=master)](https://travis-ci.org/blockchain-etl/band-protocol-etl)
[![Telegram](https://img.shields.io/badge/telegram-join%20chat-blue.svg)](https://t.me/joinchat/GsMpbA3mv1OJ6YMp3T5ORQ)

Band Protocol ETL CLI lets you convert Band Protocol data into JSON newline-delimited format.

[Full documentation available here](http://band-protocol-etl.readthedocs.io/).

## Quickstart

Install Band ETL CLI:

```bash
pip3 install band-etl
```

Export blocks, block_events, logs, messages, oracle_requests, transactions ([Schema](../docs/schema.md), [Reference](../docs/commands.md)):

```bash
> 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](../docs/commands.md#stream)):

```bash
> 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](https://band-etl.readthedocs.io/en/latest/commands/).

For the latest version, check out the repo and call 
```bash
> pip3 install -e . 
> python3 bandetl.py
```

## Useful Links

- [Schema](https://band-etl.readthedocs.io/en/latest/schema/)
- [Command Reference](https://band-etl.readthedocs.io/en/latest/commands/)
- [Documentation](https://band-etl.readthedocs.io/)

## Running Tests

```bash
> pip3 install -e .[dev,streaming]
> export BAND_PROVIDER_URI=https://poa-api-backup2.bandchain.org
> pytest -vv
```

### Running Tox Tests

```bash
> pip3 install tox
> tox
```

## Running in Docker

1. Install Docker https://docs.docker.com/install/

2. Build a docker image
        
        > docker build -t band-etl:latest .
        > docker image ls
        
3. 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

4. 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
kafka-python-handler 0.0.2
A simple package to test kafka-python.
Requires Python: >=3.6
Keywords: kafka,kafka-python,producer,consumer

## kafka-python-handler

kafka-python-handler is a wrapper around kafka-python package. This package is easy to use and can be used to test the Kafka Producer in kafka-python package.

Some important items to note.

* This package includes the basic testing only as of now.

*  Polling, parallelism etc. has not been included yet.

### Installation Instructions

The package is availble in PyPI which is an official repository for python package.
pip is a package management system and is used for installing Python packages from Python Package Index (also known as PyPI). It is the most common way to install Python packages.
Install the package in your environment using:

`pip install kafka-python-handler`


### Pre-requisites

- Python 3.x

- pip3

- Set the environment variables - KAFKA_BROKERS and TOPIC.


### How to Use?

* Import the Handler into your python code.

    `from kafka_python_handler import Handler`

#### Test Producer

To test the producer, perform the below steps.

* Instantiate the handler and then, call the test_producer().

```
handler = Handler()
handler.test_producer()
```
### License

```
Apache License
```

 The complete license terms can be found in `LICENSE` file in this repository.