Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Standalone implementation of Augur's consensus mechanism

Project Description

pyconsensus is a standalone Python implementation of Augur’s consensus mechanism. For details, please see the Augur whitepaper.

Installation

The easiest way to install pyconsensus is to use pip:

$ pip install pyconsensus

Usage

To use pyconsensus, import the Oracle class:

from pyconsensus import Oracle

# Example report matrix:
#   - each row represents a reporter
#   - each column represents an event in a prediction market
my_reports = [[0.2, 0.7,  1,  1],
              [0.3, 0.5,  1,  1],
              [0.1, 0.7,  1,  1],
              [0.5, 0.7,  2,  1],
              [0.1, 0.2,  2,  2],
              [0.1, 0.2,  2,  2]]
reputation = [1, 2, 10, 9, 4, 2]
my_event_bounds = [
    {"scaled": True, "min": 0.1, "max": 0.5},
    {"scaled": True, "min": 0.2, "max": 0.7},
    {"scaled": False, "min":  1, "max": 2},
    {"scaled": False, "min":  1, "max": 2},
]

oracle = Oracle(reports=my_reports,
                reputation=reputation,
                event_bounds=my_event_bounds)
oracle.consensus()

Tests

Unit tests are in the test/ directory.

pyconsensus is used in conjunction with the Augur Simulator to carry out randomized numerical (Monte Carlo) consensus tests. See the Simulator repository for details.

Release History

Release History

This version
History Node

0.5.8

History Node

0.5.7

History Node

0.5.6

History Node

0.5.4

History Node

0.5.3

History Node

0.5.2

History Node

0.5.1

History Node

0.5

History Node

0.4.1

History Node

0.4

History Node

0.3

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.2

History Node

0.1.1

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyconsensus-0.5.8.tar.gz (23.5 kB) Copy SHA256 Checksum SHA256 Source Jun 26, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting