{ "info": { "author": "Trustlines-Network", "author_email": "contact@brainbot.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6" ], "description": "|Build Status| |Code style: black|\n\neth-index\n=========\n\neth-index is an indexer for events on the ethereum blockchain. It\nimports events into a postgresql database. It's a companion to the\ntrustlines project relay server component.\n\nInstallation\n------------\n\nBefore trying to install py-eth-index, make sure you have the postgresql\ndevelopment header files and library installed. On debian based systems\nthis can be done by running:\n\n::\n\n apt install libpq-dev\n\neth-index uses python 3.6 or up. Please make sure you have the required\nversion installed.\n\nPlease checkout the source code from github, cd into the checked out\nrepo and run the folllowing pip command with a fresh virtualenv:\n\n::\n\n pip install -c constraints.txt .\n\nDevelopment\n-----------\n\nA complete development environment can be installed with:\n\n::\n\n pip install -c constraints.txt -r requirements.txt\n pip install -c constraints.txt -e .\n\nThis installs black, flake8, mypy and tox among other things.\n\nblack\n~~~~~\nThe source code is formatted with `black `__. If\nyou choose not to use the pre-commit hook, you should be able to format the\nsource code with ``black setup.py ethindex``.\n\nflake8\n~~~~~~\nWe use flake8 to check for errors. Run ``flake8 ethindex`` to check for errors.\n\nmypy\n~~~~\nmypy is used to check for type errors. Run ``mypy --ignore-missing-imports\nethindex`` to check manually.\n\ntox\n~~~\nRunning ``tox`` will run black, flake8, mypy and pytest locally.\n\nSince we also do run some tests for postgres, the postgres database server must\nbe installed on the local machine. It doesn't have to be started though, since\nthe tests do start postgres with a temporary data directory.\n\nOn a debian based system ``apt install postgresql`` will install the postgresql\ndatabase.\n\npre-commit\n~~~~~~~~~~\n\nThe repository comes with a configuration file for\n`pre-commit `__. We recommend using pipsi for\ninstallation of pre-commit. After installation of pre-commit, the git\ncommit hooks can be activated with ``pre-commit install`` inside the\npy-eth-index repository.\n\nInitializing the database\n-------------------------\n\nPlease setup a working postgres environment, i.e. set the PG\\*\nenvironment variables and configure ~/.pgpass.\n\nThen run\n\n::\n\n psql -f create-table.sql\n\nto create the database tables.\n\nethindex\n--------\n\nethindex is a command line program that is being used to run the actual\nsyncing process. It also uses the PG\\* variables in order to determine\nthe postgres server to connect to.\n\nethindex importabi\n~~~~~~~~~~~~~~~~~~\n\nBefore importing events into the postgres database, the ABIs must be\nknown.\n\n``ethindex importabi`` can be used to import ABIs into the postgres\ndatabase. By default it reads two json files ``addresses.json`` and\n``contracts.json`` from the current directory and adds them to the abis\ntable. These files are the exact files that the relay server also reads.\nTheir location can be specified via the ``--addresses`` and\n``-contracts`` command line arguments.\n\nUsage:\n\n::\n\n Usage: ethindex importabi [OPTIONS]\n\n Options:\n --addresses TEXT\n --contracts TEXT\n --help Show this message and exit.\n\nethindex runsync\n~~~~~~~~~~~~~~~~\n\n``ethindex runsync`` will start the actual synchronization process. On\nthe first start it will read all of the abis and create one entry in the\nsync table containing all contract addresses. It then imports all of the\nevents into the postgres table ``events``.\n\nUsage\n\n::\n\n Usage: ethindex runsync [OPTIONS]\n\n Options:\n --jsonrpc TEXT jsonrpc URL to use\n --required-confirmations INTEGER\n number of confirmations until we consider a\n block final\n --waittime INTEGER time to sleep in milliseconds waiting for a\n new block\n --startblock INTEGER Block from where events should be synced\n --syncid TEXT syncid to use\n --merge-with-syncid TEXT syncid to merge with\n --help Show this message and exit.\n\nAdding new contracts\n--------------------\nImport the contracts using the `ethindex importabi` command. Then synchronize\nthese contracts and merge them with the `default` syncid with something like the\nfollowing command::\n\n ethindex runsync --syncid new --merge-with-syncid default\n\nThis command will synchronize all contracts, which aren't already synchronized\nfor the `default` syncid and will merge the `new` syncid into the `default`\nsyncid, when both of them are fully synchronized with the chain. This means that\na runsync job has to be running for `default`.\n\n\nStatus and Limitations\n----------------------\n\n- ethindex is alpha software.\n\nChange log\n----------\n\nSee `CHANGELOG `_.\n\n.. |Build Status| image:: https://circleci.com/gh/trustlines-protocol/py-eth-index/tree/develop.svg?style=svg\n :target: https://circleci.com/gh/trustlines-protocol/py-eth-index/tree/develop\n.. |Code style: black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/ambv/black", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/trustlines-protocol/py-eth-index", "keywords": "ethereum indexer database", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "eth-index", "package_url": "https://pypi.org/project/eth-index/", "platform": "", "project_url": "https://pypi.org/project/eth-index/", "project_urls": { "Homepage": "https://github.com/trustlines-protocol/py-eth-index" }, "release_url": "https://pypi.org/project/eth-index/0.3.1/", "requires_dist": null, "requires_python": ">=3.6", "summary": "Indexer for the ethereum blockchain", "version": "0.3.1" }, "last_serial": 5091664, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "4cbd918e1a2ccc36a17a1c2189cdcaf1", "sha256": "693f51871f9638012cd5a2348aee5baa8c5cdfb1f14197a032fdbfb5af66821f" }, "downloads": -1, "filename": "eth-index-0.1.1.tar.gz", "has_sig": false, "md5_digest": "4cbd918e1a2ccc36a17a1c2189cdcaf1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 19903, "upload_time": "2018-08-21T13:21:13", "url": "https://files.pythonhosted.org/packages/7d/e3/6d62184260925353fe8d4f0a91650f17db16b0551fc4862484d86ef8a074/eth-index-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "0abfd05bb6cd885b618d8932d0abdbf9", "sha256": "b58b964b64cc3370f3222ca983e2cd522f612f9c9abf07ed803758d24f4beee5" }, "downloads": -1, "filename": "eth-index-0.2.0.tar.gz", "has_sig": false, "md5_digest": "0abfd05bb6cd885b618d8932d0abdbf9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 22168, "upload_time": "2018-09-07T11:14:43", "url": "https://files.pythonhosted.org/packages/f0/c5/fbd9df96c3f2dae749797cfa91f7c760c8572d2f32664d1291a59a82e219/eth-index-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "df658dd190716ac1a9903a4a6027303a", "sha256": "54169a598728f839e4f6cc9fa9ad0e8ffe03d2ecf731a49ad9b26c2c0331a0e3" }, "downloads": -1, "filename": "eth-index-0.2.1.tar.gz", "has_sig": false, "md5_digest": "df658dd190716ac1a9903a4a6027303a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 19333, "upload_time": "2019-01-03T17:23:31", "url": "https://files.pythonhosted.org/packages/50/5d/993e4afeefdf410067c0f04de292cce81598677f206761298817837c1104/eth-index-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "ea7ade389c7657cf949b37093977bfaa", "sha256": "a7e7e9316afbdcf08dad3d7477abe41a201deff9319decea46fa90112d150062" }, "downloads": -1, "filename": "eth-index-0.3.0.tar.gz", "has_sig": false, "md5_digest": "ea7ade389c7657cf949b37093977bfaa", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 19439, "upload_time": "2019-01-14T01:26:36", "url": "https://files.pythonhosted.org/packages/e5/d5/caab60f83dceddfabb7e1b7485ce721d221402ebb2c67bf579c2027d4691/eth-index-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "02941f3752cb43ddd86c146d5a0ea2b4", "sha256": "0f121977242d4c6d77a0c33abc2a113e4adefd84bf28c9d6a4144ce4b3585024" }, "downloads": -1, "filename": "eth-index-0.3.1.tar.gz", "has_sig": false, "md5_digest": "02941f3752cb43ddd86c146d5a0ea2b4", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 21682, "upload_time": "2019-04-03T15:45:14", "url": "https://files.pythonhosted.org/packages/00/0e/57ba6d3928b765a1b2a88323c1d20b6bdc8a039b8bde179d2e8a8bfa0e8c/eth-index-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "02941f3752cb43ddd86c146d5a0ea2b4", "sha256": "0f121977242d4c6d77a0c33abc2a113e4adefd84bf28c9d6a4144ce4b3585024" }, "downloads": -1, "filename": "eth-index-0.3.1.tar.gz", "has_sig": false, "md5_digest": "02941f3752cb43ddd86c146d5a0ea2b4", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 21682, "upload_time": "2019-04-03T15:45:14", "url": "https://files.pythonhosted.org/packages/00/0e/57ba6d3928b765a1b2a88323c1d20b6bdc8a039b8bde179d2e8a8bfa0e8c/eth-index-0.3.1.tar.gz" } ] }