A python library to push ethereum blockchain data into an sql database.
Project description
ether_sql
A Python library to push ethereum blockchain data into an sql database.
ether_sql was built by Analyse Ether, with the goal of making Ethereum data easily available to everyone. This library can be used as a backbone for creating block explorers or performing data analysis.
It is written in Python 3.5+, uses web3.py for geting data using JSON-RPC calls and uses SqlAlchemy to connect to a postgressql database.
Buidl Status
This is currently in very alpha stage, and not recommended for production use until it has received sufficient testing. Currently supports Geth, Infura and Parity node, but transaction traces (eg. internal transactions) are currently available only with Parity node.
Documentation available at: http://ether-sql.readthedocs.io
Installation guide
Please find the detailed installation guide here
Command line options
ether_sql has several built in cli commands to facilitate scraping data.
Syncing the data
To start the sync just type.
$ ether_sql scrape_block_range
This will start start pushing the data from an Infura node to the psql database.
Switching nodes
To switch nodes use the settings flag:
$ ether_sql --settings='PersonalParitySettings' scrape_block_range
Using multiple workers to sync data
To start 4 parallel workers use.
$ ether_sql --settings=YourSettings celery start -c4
The above command will start 4 workers using the settings YourSettings Then start the sync, which will automatically use the setting used to start workers. $ ether_sql scrape_block_range
Here is a demo of the process: https://www.youtube.com/watch?v=rnkfyAgGJwI&feature=youtu.be
Exporting as csv
To export the pushed data as a csv
$ ether_sql sql export_to_csv
To access other Command Line Interfaces (CLI) checkout the cli docs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ether_sql-0.1.3.tar.gz
.
File metadata
- Download URL: ether_sql-0.1.3.tar.gz
- Upload date:
- Size: 269.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.3.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71d72b19ee3361584d502d39b7288c315c49433aa70ec1b122a4e5f924940c41 |
|
MD5 | 07d27bd09d8091084dd22e5d3e33e692 |
|
BLAKE2b-256 | f6d0e7ef5c71dc906f315aacdd5068250d7f57c2f4d890711656c3d5b4c5766e |
File details
Details for the file ether_sql-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: ether_sql-0.1.3-py3-none-any.whl
- Upload date:
- Size: 284.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.3.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | add33e53557c41bf76e11836d39ed6f2434f8165bb9640e0338d04451b78f745 |
|
MD5 | bce33a94e5d8cf30a0a6100232ffcb74 |
|
BLAKE2b-256 | bc3cdaaf41d30e8273d3927358336db2695723ee1d088eae6cdc8654d30617a8 |