diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-18 05:20:45 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-18 05:20:45 +0000 |
| commit | ceabe2f38cfd4f85b12d3162d5b17c62594aa8f4 (patch) | |
| tree | 9b67a42808564d29c3fdd4bc069449706c5fd991 /python-ethereum-etl.spec | |
| parent | 82a679d4b609bfc639704dfff79e93b86649fd3b (diff) | |
automatic import of python-ethereum-etl
Diffstat (limited to 'python-ethereum-etl.spec')
| -rw-r--r-- | python-ethereum-etl.spec | 243 |
1 files changed, 243 insertions, 0 deletions
diff --git a/python-ethereum-etl.spec b/python-ethereum-etl.spec new file mode 100644 index 0000000..0d96933 --- /dev/null +++ b/python-ethereum-etl.spec @@ -0,0 +1,243 @@ +%global _empty_manifest_terminate_build 0 +Name: python-ethereum-etl +Version: 2.2.1 +Release: 1 +Summary: Tools for exporting Ethereum blockchain data to CSV or JSON +License: MIT License +URL: https://github.com/blockchain-etl/ethereum-etl +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b6/31/b6f7825e28aa41901209e945a2da22d8d67933466317ddc9a4fa33a9ba0e/ethereum-etl-2.2.1.tar.gz +BuildArch: noarch + + +%description +Stream blocks, transactions, logs, token_transfers continually to console ([Reference](docs/commands.md#stream)): +```bash +> pip3 install ethereum-etl[streaming] +> ethereumetl stream --start-block 500000 -e block,transaction,log,token_transfer --log-file log.txt \ +--provider-uri https://mainnet.infura.io/v3/7aef3f0cd1f64408b163814b22cc643c +``` +Find other commands [here](https://ethereum-etl.readthedocs.io/en/latest/commands/). +For the latest version, check out the repo and call +```bash +> pip3 install -e . +> python3 ethereumetl.py +``` +## Useful Links +- [Schema](https://ethereum-etl.readthedocs.io/en/latest/schema/) +- [Command Reference](https://ethereum-etl.readthedocs.io/en/latest/commands/) +- [Documentation](https://ethereum-etl.readthedocs.io/) +- [Public Datasets in BigQuery](https://github.com/blockchain-etl/public-datasets) +- [Exporting the Blockchain](https://ethereum-etl.readthedocs.io/en/latest/exporting-the-blockchain/) +- [Querying in Amazon Athena](https://ethereum-etl.readthedocs.io/en/latest/amazon-athena/) +- [Querying in Google BigQuery](https://ethereum-etl.readthedocs.io/en/latest/google-bigquery/) +- [Querying in Kaggle](https://www.kaggle.com/bigquery/ethereum-blockchain) +- [Airflow DAGs](https://github.com/blockchain-etl/ethereum-etl-airflow) +- [Postgres ETL](https://github.com/blockchain-etl/ethereum-etl-postgresql) +- [Ethereum 2.0 ETL](https://github.com/blockchain-etl/ethereum2-etl) +## Running Tests +```bash +> pip3 install -e .[dev,streaming] +> export ETHEREUM_ETL_RUN_SLOW_TESTS=True +> export PROVIDER_URL=<your_porvider_uri> +> pytest -vv +``` +### Running Tox Tests +```bash +> pip3 install tox +> tox +``` +## Running in Docker +1. Install Docker: https://docs.docker.com/get-docker/ +2. Build a docker image + > docker build -t ethereum-etl:latest . + > docker image ls +3. Run a container out of the image + > docker run -v $HOME/output:/ethereum-etl/output ethereum-etl:latest export_all -s 0 -e 5499999 -b 100000 -p https://mainnet.infura.io + > docker run -v $HOME/output:/ethereum-etl/output ethereum-etl:latest export_all -s 2018-01-01 -e 2018-01-01 -p https://mainnet.infura.io +4. Run streaming to console or Pub/Sub + > docker build -t ethereum-etl:latest . + > echo "Stream to console" + > docker run ethereum-etl:latest stream --start-block 500000 --log-file log.txt + > echo "Stream to Pub/Sub" + > docker run -v /path_to_credentials_file/:/ethereum-etl/ --env GOOGLE_APPLICATION_CREDENTIALS=/ethereum-etl/credentials_file.json ethereum-etl:latest stream --start-block 500000 --output projects/<your-project>/topics/crypto_ethereum +If running on Apple M1 chip add the `--platform linux/x86_64` option to the `build` and `run` commands e.g.: +``` +docker build --platform linux/x86_64 -t ethereum-etl:latest . +docker run --platform linux/x86_64 ethereum-etl:latest stream --start-block 500000 +``` +## Projects using Ethereum ETL +* [Google](https://goo.gl/oY5BCQ) - Public BigQuery Ethereum datasets +* [Nansen](https://nansen.ai/query?ref=ethereumetl) - Analytics platform for Ethereum + +%package -n python3-ethereum-etl +Summary: Tools for exporting Ethereum blockchain data to CSV or JSON +Provides: python-ethereum-etl +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-ethereum-etl +Stream blocks, transactions, logs, token_transfers continually to console ([Reference](docs/commands.md#stream)): +```bash +> pip3 install ethereum-etl[streaming] +> ethereumetl stream --start-block 500000 -e block,transaction,log,token_transfer --log-file log.txt \ +--provider-uri https://mainnet.infura.io/v3/7aef3f0cd1f64408b163814b22cc643c +``` +Find other commands [here](https://ethereum-etl.readthedocs.io/en/latest/commands/). +For the latest version, check out the repo and call +```bash +> pip3 install -e . +> python3 ethereumetl.py +``` +## Useful Links +- [Schema](https://ethereum-etl.readthedocs.io/en/latest/schema/) +- [Command Reference](https://ethereum-etl.readthedocs.io/en/latest/commands/) +- [Documentation](https://ethereum-etl.readthedocs.io/) +- [Public Datasets in BigQuery](https://github.com/blockchain-etl/public-datasets) +- [Exporting the Blockchain](https://ethereum-etl.readthedocs.io/en/latest/exporting-the-blockchain/) +- [Querying in Amazon Athena](https://ethereum-etl.readthedocs.io/en/latest/amazon-athena/) +- [Querying in Google BigQuery](https://ethereum-etl.readthedocs.io/en/latest/google-bigquery/) +- [Querying in Kaggle](https://www.kaggle.com/bigquery/ethereum-blockchain) +- [Airflow DAGs](https://github.com/blockchain-etl/ethereum-etl-airflow) +- [Postgres ETL](https://github.com/blockchain-etl/ethereum-etl-postgresql) +- [Ethereum 2.0 ETL](https://github.com/blockchain-etl/ethereum2-etl) +## Running Tests +```bash +> pip3 install -e .[dev,streaming] +> export ETHEREUM_ETL_RUN_SLOW_TESTS=True +> export PROVIDER_URL=<your_porvider_uri> +> pytest -vv +``` +### Running Tox Tests +```bash +> pip3 install tox +> tox +``` +## Running in Docker +1. Install Docker: https://docs.docker.com/get-docker/ +2. Build a docker image + > docker build -t ethereum-etl:latest . + > docker image ls +3. Run a container out of the image + > docker run -v $HOME/output:/ethereum-etl/output ethereum-etl:latest export_all -s 0 -e 5499999 -b 100000 -p https://mainnet.infura.io + > docker run -v $HOME/output:/ethereum-etl/output ethereum-etl:latest export_all -s 2018-01-01 -e 2018-01-01 -p https://mainnet.infura.io +4. Run streaming to console or Pub/Sub + > docker build -t ethereum-etl:latest . + > echo "Stream to console" + > docker run ethereum-etl:latest stream --start-block 500000 --log-file log.txt + > echo "Stream to Pub/Sub" + > docker run -v /path_to_credentials_file/:/ethereum-etl/ --env GOOGLE_APPLICATION_CREDENTIALS=/ethereum-etl/credentials_file.json ethereum-etl:latest stream --start-block 500000 --output projects/<your-project>/topics/crypto_ethereum +If running on Apple M1 chip add the `--platform linux/x86_64` option to the `build` and `run` commands e.g.: +``` +docker build --platform linux/x86_64 -t ethereum-etl:latest . +docker run --platform linux/x86_64 ethereum-etl:latest stream --start-block 500000 +``` +## Projects using Ethereum ETL +* [Google](https://goo.gl/oY5BCQ) - Public BigQuery Ethereum datasets +* [Nansen](https://nansen.ai/query?ref=ethereumetl) - Analytics platform for Ethereum + +%package help +Summary: Development documents and examples for ethereum-etl +Provides: python3-ethereum-etl-doc +%description help +Stream blocks, transactions, logs, token_transfers continually to console ([Reference](docs/commands.md#stream)): +```bash +> pip3 install ethereum-etl[streaming] +> ethereumetl stream --start-block 500000 -e block,transaction,log,token_transfer --log-file log.txt \ +--provider-uri https://mainnet.infura.io/v3/7aef3f0cd1f64408b163814b22cc643c +``` +Find other commands [here](https://ethereum-etl.readthedocs.io/en/latest/commands/). +For the latest version, check out the repo and call +```bash +> pip3 install -e . +> python3 ethereumetl.py +``` +## Useful Links +- [Schema](https://ethereum-etl.readthedocs.io/en/latest/schema/) +- [Command Reference](https://ethereum-etl.readthedocs.io/en/latest/commands/) +- [Documentation](https://ethereum-etl.readthedocs.io/) +- [Public Datasets in BigQuery](https://github.com/blockchain-etl/public-datasets) +- [Exporting the Blockchain](https://ethereum-etl.readthedocs.io/en/latest/exporting-the-blockchain/) +- [Querying in Amazon Athena](https://ethereum-etl.readthedocs.io/en/latest/amazon-athena/) +- [Querying in Google BigQuery](https://ethereum-etl.readthedocs.io/en/latest/google-bigquery/) +- [Querying in Kaggle](https://www.kaggle.com/bigquery/ethereum-blockchain) +- [Airflow DAGs](https://github.com/blockchain-etl/ethereum-etl-airflow) +- [Postgres ETL](https://github.com/blockchain-etl/ethereum-etl-postgresql) +- [Ethereum 2.0 ETL](https://github.com/blockchain-etl/ethereum2-etl) +## Running Tests +```bash +> pip3 install -e .[dev,streaming] +> export ETHEREUM_ETL_RUN_SLOW_TESTS=True +> export PROVIDER_URL=<your_porvider_uri> +> pytest -vv +``` +### Running Tox Tests +```bash +> pip3 install tox +> tox +``` +## Running in Docker +1. Install Docker: https://docs.docker.com/get-docker/ +2. Build a docker image + > docker build -t ethereum-etl:latest . + > docker image ls +3. Run a container out of the image + > docker run -v $HOME/output:/ethereum-etl/output ethereum-etl:latest export_all -s 0 -e 5499999 -b 100000 -p https://mainnet.infura.io + > docker run -v $HOME/output:/ethereum-etl/output ethereum-etl:latest export_all -s 2018-01-01 -e 2018-01-01 -p https://mainnet.infura.io +4. Run streaming to console or Pub/Sub + > docker build -t ethereum-etl:latest . + > echo "Stream to console" + > docker run ethereum-etl:latest stream --start-block 500000 --log-file log.txt + > echo "Stream to Pub/Sub" + > docker run -v /path_to_credentials_file/:/ethereum-etl/ --env GOOGLE_APPLICATION_CREDENTIALS=/ethereum-etl/credentials_file.json ethereum-etl:latest stream --start-block 500000 --output projects/<your-project>/topics/crypto_ethereum +If running on Apple M1 chip add the `--platform linux/x86_64` option to the `build` and `run` commands e.g.: +``` +docker build --platform linux/x86_64 -t ethereum-etl:latest . +docker run --platform linux/x86_64 ethereum-etl:latest stream --start-block 500000 +``` +## Projects using Ethereum ETL +* [Google](https://goo.gl/oY5BCQ) - Public BigQuery Ethereum datasets +* [Nansen](https://nansen.ai/query?ref=ethereumetl) - Analytics platform for Ethereum + +%prep +%autosetup -n ethereum-etl-2.2.1 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-ethereum-etl -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 2.2.1-1 +- Package Spec generated |
