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:

$ pip 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.1.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

turtlecoin-0.1.0-py2.py3-none-any.whl (12.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: turtlecoin-0.1.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for turtlecoin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6b1ec1f52b4ba25b55e91929ef2acea245495ec0350be5786eb5db8d1e1e1d38
MD5 2203f9e9117a065d380f330c4b795a80
BLAKE2b-256 89506961e3b2c4e142315c7015b07b90c6631b280704ec0c4912052e4190dc22

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for turtlecoin-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 610f462a8820a414542e93316fb3b25f1360c7c9d02001f08674c39879fc05ec
MD5 09362904605107ae9d9b3dac4516e19a
BLAKE2b-256 17f6934e3058f64de869dde9702e1aa9e8db1448cdc3b3b9a93d49364188a7b3

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