A Python wrapper for the TurtleCoin JSON-RPC interface
Branch: master
Clone or download
Pull request Compare This branch is 5 commits ahead of arthurk:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
turtlecoin
.gitignore
LICENSE
MANIFEST.in
Makefile start working on documentation Mar 21, 2018
Pipfile
Pipfile.lock package updates May 28, 2018
README.rst changed from pip to pip3 Jun 22, 2018
readthedocs.yml
run.py update to use turtlecoin 0.4.2 release Apr 5, 2018
setup.py

README.rst

turtlecoin-python

https://readthedocs.org/projects/turtlecoin-python/badge/

A Python wrapper for the TurtleCoin JSON-RPC API.

It integrates with Walletd and TurtleCoind and works with TurtleCoin 0.5.0.

Example

wallet.get_addresses()
'TRTLv1abcdef...'
{'id': 0, 'jsonrpc': '2.0', 'result': {'addresses': ['TRTLv2R....']}}

wallet.get_balance()
{'id': 0, 'jsonrpc': '2.0', 'result': {'availableBalance': 50, 'lockedAmount': 0}}

recipients = [{'address': 'TRTLv3abcd123...', 'amount': 50}]
wallet.send_transaction(transfers=recipients)
{'id': 0, 'jsonrpc': '2.0', 'result': {'transactionHash': 'ae57e...'}}

Installation

You can install the latest version from PyPI:

$ pip3 install turtlecoin

Documentation

The documentation is available at http://turtlecoin-python.readthedocs.io

Developer setup

Clone the repo and install the dependencies with ...pipenv:

$ git clone ...
$ cd turtlecoin-python
$ pipenv install --dev

To generate the HTML documentation you need to have the turtlecoin module in your PYTHONPATH. This is used to automatically generate the api docs. Afterwards you can run the makefile target:

$ pipenv run python setup.py develop
$ pipenv run make html

The documentation on readthedocs is automatically updated on each push to the master branch (via webhook).

To release a new version on PyPI, increment the version number in turtlecoin/__version__.py and run:

$ pipenv run python setup.py upload

This will also create a git tag with the version number.