Git Product home page Git Product logo

events-plugin-example's Introduction

BigchainDB block plugin example

This repo contains a minimal implementation of a plugin for BigchainDB. It listens to blocks and print the id of the block to the console.

It can be used as a baseline to publish the newly created blocks to different services, like RabbitMQ.

Usage

Clone this repository and install the module:

$ pip install -e .

The module must be visible by BigchainDB. You can install it globally (you might need to use sudo) or in a virtual env.

Then, add the plugin to your .bigchaindb configuration:

{
    "server": { ... },
    "wsserver": { ... },
    ...
    "events_plugins": ["console_print"]
    ...
}

You can now run BigchainDB:

$ bigchaindb start

The log should display something like:

[2017-07-31 02:36:10] [INFO] (bigchaindb.processes) Loading block publisher plugin console_print (MainProcess - pid: 27894)
**************************************
Hello from bigchaindb_print_on_console
**************************************

...

************************* Got new block ************************
bdf87db2fefba96b9274928df511ee75e1db239cbce0752657eb8552d5344038
****************************************************************

...

The Block model

Refer to the official documentation for the Block Model

events-plugin-example's People

Contributors

vrde avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.