All Projects → gnosis → django-eth-events

gnosis / django-eth-events

Licence: MIT license
No description or website provided.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to django-eth-events

dry-events
Pub/sub system
Stars: ✭ 102 (+137.21%)
Mutual labels:  events
pg-pubsub
Reliable PostgreSQL LISTEN/NOTIFY with inter-process lock support
Stars: ✭ 50 (+16.28%)
Mutual labels:  events
ember-event-helpers
Complimentary event template helpers to the {{on}} modifier
Stars: ✭ 33 (-23.26%)
Mutual labels:  events
eventcatalog
Discover, Explore and Document your Event Driven Architectures powered by Markdown.
Stars: ✭ 392 (+811.63%)
Mutual labels:  events
cyberevents
The protocol for EVENTs and TICKETs
Stars: ✭ 16 (-62.79%)
Mutual labels:  events
event
📆 Strictly typed event emitter with asynciterator support
Stars: ✭ 30 (-30.23%)
Mutual labels:  events
game-map-editor
game-map-editor
Stars: ✭ 17 (-60.47%)
Mutual labels:  events
Evilize
Parses Windows event logs files based on SANS Poster
Stars: ✭ 24 (-44.19%)
Mutual labels:  events
from-event
🦊 ViewChild and FromEvent — a Match Made in Angular Heaven
Stars: ✭ 130 (+202.33%)
Mutual labels:  events
LogHub
No description or website provided.
Stars: ✭ 38 (-11.63%)
Mutual labels:  events
tsee
Typed EventEmitter implemented with tsargs
Stars: ✭ 22 (-48.84%)
Mutual labels:  events
tutorial
Tutorials to help you build your first Swim app
Stars: ✭ 27 (-37.21%)
Mutual labels:  events
transceiver
Channel based event bus with request/reply pattern, using promises. For node & browser.
Stars: ✭ 25 (-41.86%)
Mutual labels:  events
hackertab.dev
Hackertab turns your New Tab page into a geeky one that keeps you as a developer updated with the best tools, news, jobs and events.
Stars: ✭ 229 (+432.56%)
Mutual labels:  events
ofxVui
✨ Such Wow! View + GUI System for openFrameworks ✨
Stars: ✭ 48 (+11.63%)
Mutual labels:  events
azure-service-bus-go
Golang library for Azure Service Bus -- https://aka.ms/azsb
Stars: ✭ 67 (+55.81%)
Mutual labels:  events
node-cqrs-saga
Node-cqrs-saga is a node.js module that helps to implement the sagas in cqrs. It can be very useful as domain component if you work with (d)ddd, cqrs, eventdenormalizer, host, etc.
Stars: ✭ 59 (+37.21%)
Mutual labels:  events
wwwtf.berlin
wwwtf, a ~week of events organized for and by the web community
Stars: ✭ 46 (+6.98%)
Mutual labels:  events
tomodachi
💻 Microservice library / framework using Python's asyncio event loop with full support for HTTP + WebSockets, AWS SNS+SQS, RabbitMQ / AMQP, middleware, etc. Extendable for GraphQL, protobuf, gRPC, among other technologies.
Stars: ✭ 170 (+295.35%)
Mutual labels:  events
watermill-sql
SQL Pub/Sub for the Watermill project.
Stars: ✭ 39 (-9.3%)
Mutual labels:  events

Build Status Coverage Status Python 3.6 Django 2 PyPI version

django_eth_events

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

Setup

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+https://github.com/gnosis/django-eth-events.git#egg=Package

Add django_eth_events to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'django_eth_events',
    ...
)

Settings

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

ETHEREUM_NODE_URL = os.environ['ETHEREUM_NODE_URL']

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:

ETHEREUM_MAX_WORKERS = os.environ['ETHEREUM_MAX_WORKERS']

IPFS

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:

ETH_EVENTS = [
    {
        '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

Tests

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

Django tests can also be used

DJANGO_SETTINGS_MODULE=config.settings.test python manage.py test

Coverage can be run using coverage tool:

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

Run specific test cases

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

More information at https://docs.djangoproject.com/en/2.2/topics/testing/overview/#running-tests.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].