A framework to connect other cryptocurrencies to the Waves-Platform.
Project description
Waves-Gateway-Framework
A framework to connect other cryptocurrencies to the Waves platform. Requires Python 3.5 or newer.
For detailed usage instructions please refer to the source code documentation that may be exported by using the commands described below. The framework exports a class Gateway. This class has to instantiated. Once done, the Gateway can be started by calling the run method on the resulting instance.
The constructor of the Gateway class requires instances of certain interfaces. Those interfaces define the required functionality that a concrete Gateway implementation has to provide. You may also take a look at an example implementation that realizes a Waves-Gateway for Litecoin: https://github.com/jansenmarc/WavesGatewayLTCExample.
How to install
pip install waves-gateway
Required packages for development
python3.5 -m pip install coverage mypy pylint Sphinx
Lint
The PyLint package is required for linting. Install it like this: pip install pylint.
python3.5 setup.py lint
MyPy
The MyPy package performs static type analysis to prevent errors.
python3.5 setup.py mypy
Unittest
python3.5 setup.py test
The convention is to write Unittests for every class in a separate file starting with test_ This is the default prefix of the python Unittest module.
Coverage
python3.5 setup.py coverage
Documentation Generation
Creates a folder docs with the generated HTML documentation.
pip install . -U
python3.5 setup.py docs
Doctest
Doctests are not used in this project. Write Unittests instead.
yapf
This project uses yapf (https://github.com/google/yapf) as a formatting tool So, please format your code before commiting by running this:
python3.5 -m yapf -r waves_gateway --style pep8 --style {COLUMN_LIMIT:120} -i
The pipeline will fail if the code is not properly formatted.
Distribution
First, run npm run build:prod to update the assets. After that, run python3.5 setup.py sdist to create an installable tar archive.
Publish to test.pypi.org:
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
Regular publish:
twine upload dist/*
Recommendations
Use Python 3.5 for development.
PyCharm users should enable Gevent compatible debugging: https://blog.jetbrains.com/pycharm/2012/08/gevent-debug-support/.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file waves_gateway-1.0.5.tar.gz
.
File metadata
- Download URL: waves_gateway-1.0.5.tar.gz
- Upload date:
- Size: 302.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bd23bb8d70d49a707c88d4bd170d47b1bda9befd1aa0e7c8efbd520a82a8421 |
|
MD5 | 2bf504b5663cf989ebeba4505c2a5423 |
|
BLAKE2b-256 | d0475360ab6a53943968c3567472de1bbad66d911bf717e9603735a14a5769fc |