starsStars 39
forksForks 7
watchersWatchers 39
current-versionCurrent version
total-releasesTotal releases 0
open_issues_countOpen issues 3
dateFirst release -
dateLatest release -
updateLast update 2020-11-30


A standalone Django app for decoding Ethereum events compatible with Python 3.x. This app provides methods and Celery tasks to continuously decode events from ethereum blockchain and index then in a relational database. Too see an example of using this you can check Gnosis TradingDB repository and readthedocs documentation


If you want to install the latest stable release from PyPi:

$ pip install django-eth-events

If you want to install the latest development version from GitHub:

$ pip install -e git+

Add django_eth_events to your INSTALLED_APPS:



Provide an Ethereum node url. Provider will be detected depending on the protocol of the url. http/s, ipc and ws(websocket) providers are available. Recommended protocol is HTTPS. For example, using https://localhost:8545 communication with node will use RPC through HTTPS


You can also provide an IPC path to a node running locally, which will be faster, using ipc://PATH_TO_IPC_SOCKET

Number of concurrent threads connected to the ethereum node can be configured:



Provide an IPFS host and port:

IPFS_HOST = os.environ['IPFS_HOST']
IPFS_PORT = os.environ['IPFS_PORT']

Listening to Events

Create a new array ETH_EVENTS in your settings file and as follows:

        'ADDRESSES': ['0x254dffcd3277C0b1660F6d42EFbB754edaBAbC2B'],
        'EVENT_ABI': '... ABI ...',
        'EVENT_DATA_RECEIVER': 'yourmodule.event_receivers.YourReceiverClass',
        'NAME': 'Your Contract Name',
        'PUBLISH': True,
        'ADDRESSES_GETTER': 'yourmodule.address_getters.YouCustomAddressGetter',
        'EVENT_ABI': '... ABI ...',
        'EVENT_DATA_RECEIVER': 'chainevents.event_receivers.MarketInstanceReceiver',
        'NAME': 'Standard Markets Buy/Sell/Short Receiver'

Take a look at Gnosis TradingDB repository and check out the full documentation.

Django-eth-events development

The easiest way to start development on django-eth-events is to install dependencies using pip and a virtualenv, python3.6 is required:

virtualenv -p python3.6 venv
source venv/bin/activate
pip install -r requirements


You can launch tests using python No additional services are required.

Django tests can also be used

DJANGO_SETTINGS_MODULE=config.settings.test python test

Coverage can be run using coverage tool:

pip install coverage
DJANGO_SETTINGS_MODULE=config.settings.test coverage run --source=django_eth_events test

Run specific test cases

DJANGO_SETTINGS_MODULE=config.settings.test python test django_eth_events.tests.test_file

More information at