Skip to main content

Ripple JSON-RPC API and Data API wrapper for Python

Project description

python-ripple-lib is a client library to access Ripple rippled API and Data API.
Currently it supports public and admin methods (some of them still are work in progress though). List of implemented methods is displayed below. Basically, it’s just a wrapper on top of http requests made to API.

Available on PyPi

Installation

To install the package from PyPi run the following command

pip install python-ripple-lib

If you want to install package from this repo, use setup.py

python setup.py install

If you want to install package just for development purposes, use another command

python setup.py develop

This command creates symlinks to package files instead of copying it to package directory

JSON-RPC Methods

Most of JSON-RPC methods are implemented inside, for the full list of methods please refer to list of Public and Admin methods from ripple documentation
How to use:
from ripple_api import RippleRPCClient

rpc = RippleRPCClient('http://s1.ripple.com:51234/')
account_info = rpc.account_info('r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59')

Data API Methods

Most of Data API requests are implemented here as well, fll list located in here
How to use:
from ripple_api import RippleDataAPIClient

api = RippleDataAPIClient('https://data.ripple.com')
identifier = '3170DA37CE2B7F045F889594CBC323D88686D2E90E8FFD2BBCD9BAD12E416DB5'
query_params = dict(transactions='true')
ledger_info = api.get_ledger(ledger_identifier=identifier, **query_params)

Additional methods

Send XRP from address tp address via Account instance:

from ripple_api import Account

taker = 'rYuHe4VogMzYmvHpSsgGxRH97UvqumgER'
issuer = 'rMEmLrfkfooLjdkerU5TKTcAVpfy9fpSxt'
seed = '<account_seed>'
account = Account('http://localhost:5005', issuer, seed)
tx_info = account.send_xrp(issuer=issuer, taker=taker, secret=seed, amount=10)

Contributing

  1. Fork this project

  2. Clone it locally

  3. Add your changes

  4. Run tests:

make test

or

python -m unittest -v
  1. If tests are successful and everything is OK, commit to your local fork

  2. Submit a pull request to this repo

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

python-ripple-lib-1.0.6.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_ripple_lib-1.0.6-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file python-ripple-lib-1.0.6.tar.gz.

File metadata

  • Download URL: python-ripple-lib-1.0.6.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.4.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.8

File hashes

Hashes for python-ripple-lib-1.0.6.tar.gz
Algorithm Hash digest
SHA256 6a78064917a8748f5a1f22b363aaacb0e583d3cc5f8fb459fbc47a79a76d794f
MD5 93ecd469af5f53aca7fde02d53522dbf
BLAKE2b-256 cabf05a5b0c9de1a337b7809d2f973ccb49c6bcbba80c1903e1cd35d73520e29

See more details on using hashes here.

File details

Details for the file python_ripple_lib-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: python_ripple_lib-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.4.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.8

File hashes

Hashes for python_ripple_lib-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 180a9eee53849d3df9f9eb78e9a3e1cc68b023f0039e0a2c628395f9e7f476b2
MD5 ed2593d0ff66339fa1671a66bec407a2
BLAKE2b-256 971e0799100b17c39be41b58e6cc08a32d391908c173cb7c55f166261327d6ee

See more details on using hashes here.

Supported by

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