Metadata-Version: 2.0
Name: openchain
Version: 0.1.0b3
Summary: Openchain Library
Home-page: https://bitbucket.org/manti_by/openchain/
Author: Alexander Chaika
Author-email: manti.by@gmail.com
License: BSD
Description-Content-Type: UNKNOWN
Keywords: blockchain
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3.5
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.5
Requires-Dist: ecdsa (<0.14,>=0.13)
Requires-Dist: leveldb (<0.21,>=0.20)
Requires-Dist: plyvel (<0.10,>=0.9)
Requires-Dist: xxhash (<1.1,>=1.0)

Openchain Library
=================

About
-----

Library for creating blockchain networks.


.. image:: https://circleci.com/bb/manti_by/openchain/tree/master.svg?style=shield&circle-token=7f803605b49718f938b3c300f707ba4fc188cb1e
    :target: https://circleci.com/bb/manti_by/openchain/tree/master

.. image:: https://codecov.io/bb/manti_by/openchain/branch/master/graph/badge.svg
  :target: https://codecov.io/bb/manti_by/openchain

.. image:: https://img.shields.io/badge/license-BSD-blue.svg
    :target: https://bitbucket.org/manti_by/openchain/raw/a482d552071732134966ae28262d1eef5a19b19d/LICENSE.txt


**WARNING:** Currently library in **Beta** development status, use at your own risk.

Author: Alexander Chaika <manti.by@gmail.com>

Source link: https://bitbucket.org/manti_by/openchain

Requirements:

- Base - Python 3.5+, ECSDA, LevelDB/Plyvel
- Development - Flake8, Coverage
- Examples - Docker, Tornado, PyP2P

Installation
------------

Install system libraries

    $ sudo apt install python3-dev libleveldb-dev

Install package from `PyPi <https://pypi.python.org/pypi/openchain>`_

    $ pip install openchain

Alternatively clone from `Bitbucket <https://bitbucket.org/manti_by/openchain>`_

    $ git clone git@bitbucket.org:manti_by/openchain.git

    $ cd openchain/

    $ python setup.py install

Environment variables
---------------------

- $DATABASE_PATH - path to store LevelDB files

Run the examples with Docker
----------------------------

    $ cd examples/

    $ docker build -t mantiby/openchain:latest .

    $ docker swarm init

    $ docker stack deploy -c docker-compose.yml openchain

Run unit tests and coverage
---------------------------

    $ mkdir -p /var/tmp/leveldb/test/

    $ export DATABASE_PATH='/var/tmp/leveldb/test/'

    $ python -m unittest discover -s openchain/tests/ -p ``'*_tests.py'``

    $ coverage run -m unittest discover -s openchain/tests/ -p ``'*_tests.py'``

    $ coverage report -m

