IoTeX ETL CLI
IoTeX ETL CLI lets you convert IoTeX data into JSON newline-delimited format.
Full documentation available here.
Quickstart
Install IoTeX ETL CLI:
pip3 install iotex-etl
Export blocks, actions and logs (Schema, Reference):
> iotexetl export_blocks --start-block 1 --end-block 500000 \
--output-dir output --provider-uri grpcs://api.mainnet.iotex.one:443
Stream blocks, actions and logs to console (Reference):
> pip3 install iotex-etl[streaming]
> iotexetl stream --start-block 500000 -e block,action,log --log-file log.txt \
--provider-uri grpcs://api.mainnet.iotex.one:443
Find other commands here.
For the latest version, check out the repo and call
> pip3 install -e .
> python3 iotexetl.py
Useful Links
Running Tests
> pip3 install -e .[dev,streaming]
> export IOTEXETL_PROVIDER_URI=grpcs://api.mainnet.iotex.one:443
> pytest -vv
Running Tox Tests
> pip3 install tox
> tox
Running in Docker
-
Install Docker https://docs.docker.com/install/
-
Build a docker image
> docker build -t iotex-etl:latest . > docker image ls -
Run a container out of the image
> docker run -v $HOME/output:/iotex-etl/output iotex-etl:latest export_blocks -s 1 -e 5499999 -b 1000 -o out -
Run streaming to console or Pub/Sub
> docker build -t iotex-etl:latest -f Dockerfile . > echo "Stream to console" > docker run iotex-etl:latest stream --start-block 500000 --log-file log.txt > echo "Stream to Pub/Sub" > docker run -v /path_to_credentials_file/:/iotex-etl/ --env GOOGLE_APPLICATION_CREDENTIALS=/iotex-etl/credentials_file.json iotex-etl:latest stream --start-block 500000 --output projects/<your-project>/topics/mainnet
Generating iotex types and api code
-
Clone iotex-proto git repository
https://github.com/iotexproject/iotex-proto -
Install grpcio-tools package
pip install grpcio-tools -
Run following commands to generate code to python directory
mkdir python
python -m grpc_tools.protoc -I. -I ./proto/types --python_out=./python --grpc_python_out=./python ./proto/api/api.proto
python -m grpc_tools.protoc -I. -I ./proto/types --python_out=./python --grpc_python_out=./python ./proto/types/*
Metadata
Release files for iotex-etl 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| iotex-etl-1.0.2.tar.gz | 44.4 kB | Without provenance | Details |
Release files / iotex-etl-1.0.2.tar.gz
| Download URL | iotex-etl-1.0.2.tar.gz |
|---|---|
| Size | 44.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
66a867bec045c3e78a39ff4c9bf27ef48cc1e6bc147be097536d05077738abf6
|
|
BLAKE2b-256 checksum How to use checksums |
89a1c6cbb64c2bed084d1e543c57af09439040496a9395c9699396774ce0ac87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|
Security for iotex-etl 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.