A simple wrapper for the cryptonator exchange rate API.
Project description
Cryptonator Python API
A simple wrapper for the Cryptonator exchange rate API.
Install
You can either install Cryptonator by using pip
, or simply copy the
cryptonator.py
file in you project root directory.
$ pip install cryptonator # add --user if you want
Usage
import cryptonator
"""Get an exchange rate between two currencies."""
cryptonator.get_exchange_rate('usd', 'eur')
# 0.95147479
"""A Cryptonator API object can speed-up things if you need multiple calls."""
api = cryptonator.Cryptonator()
"""Get an exchange rate between a single curreny and many targets."""
api.get_exchange_rates('usd', ['eur', 'btc', 'xrp'])
# {'btc': 0.00136076, 'eur': 0.95147479, 'xrp': 144.71780029}
Testing
Tests can be found in test_cryptonator.py
.
You can launch them with:
$ python test_cryptonator.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cryptonator-0.0.3.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for cryptonator-0.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fd0a8cd30e27d34f145ea537348663f41f0057837a233522aaea615832cc0ac |
|
MD5 | d0e2be3ccf1dd489ec9f98ca9716051f |
|
BLAKE2b-256 | 8dea7c04f319478c194298b893bce19e8116b72179662d94bf8c09a93f1d702d |