Skip to main content

A Python wrapper for the TurtleCoin JSON-RPC interface

Project description

https://img.shields.io/pypi/v/turtlecoin.svg https://img.shields.io/pypi/pyversions/turtlecoin.svg https://img.shields.io/pypi/l/turtlecoin.svg 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.

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

turtlecoin-0.2.1.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

turtlecoin-0.2.1-py2.py3-none-any.whl (15.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file turtlecoin-0.2.1.tar.gz.

File metadata

  • Download URL: turtlecoin-0.2.1.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/38.5.2 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.4

File hashes

Hashes for turtlecoin-0.2.1.tar.gz
Algorithm Hash digest
SHA256 604ad9b0dddde7481b06d532955959f3cf139075905785f3fe813a57c04f2c83
MD5 dc66e6c7020c7746333fbcc0f6cf79b6
BLAKE2b-256 29f4129482245a8c1f1229391d8c6be1360aaa455fd20a75980ac2df5c22f07e

See more details on using hashes here.

File details

Details for the file turtlecoin-0.2.1-py2.py3-none-any.whl.

File metadata

  • Download URL: turtlecoin-0.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/38.5.2 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.4

File hashes

Hashes for turtlecoin-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c54f1861150d6eeb89efd0154ab24c625d099dbde7a39bd0464fb93e19802365
MD5 99dea6fb679a301afadacd96257f935e
BLAKE2b-256 e4560a69bd151bb507f6683a17811560b77f73c3ea92f05de054ff4cbfa02840

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page