Metadata-Version: 2.1
Name: ether-sql
Version: 0.1.3
Summary: A python library to push ethereum blockchain data into an sql database.
Home-page: https://github.com/analyseether/ether_sql
Author: Ankit Chiplunkar
Author-email: ankit@analyseether.com
License: UNKNOWN
Keywords: ethereum
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Requires-Python: >=3.6, <4
Provides-Extra: linter
Provides-Extra: tester
Requires-Dist: web3 (==4.4.1)
Requires-Dist: sqlalchemy (==1.2.4)
Requires-Dist: alembic (==0.9.9)
Requires-Dist: psycopg2-binary (==2.7.4)
Requires-Dist: Click (==6.7)
Requires-Dist: Celery (==4.1.1)
Provides-Extra: linter
Requires-Dist: flake8 (==3.4.1); extra == 'linter'
Requires-Dist: isort (<5,>=4.2.15); extra == 'linter'
Provides-Extra: tester
Requires-Dist: pytest (==3.0.0); extra == 'tester'
Requires-Dist: pytest-cov (==2.2.1); extra == 'tester'

ether\_sql
==========

A Python library to push ethereum blockchain data into an sql database.

ether\_sql was built by `Analyse
Ether <https://www.analyseether.com/>`__, 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 <https://github.com/ethereum/web3.py>`__ for geting data using
JSON-RPC calls and uses
`SqlAlchemy <http://docs.sqlalchemy.org/en/latest/>`__ 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.

|Build Status|

Documentation available at: http://ether-sql.readthedocs.io

Installation guide
==================

Please find the detailed installation guide
`here <http://ether-sql.readthedocs.io/en/latest/installation.html>`__

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 <http://ether-sql.readthedocs.io/en/latest/api/cli.html>`__.

.. |Build Status| image:: https://travis-ci.org/analyseether/ether_sql.svg?branch=master
   :target: https://travis-ci.org/analyseether/ether_sql


