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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file cryptonator-0.0.4-py2.py3-none-any.whl
.
File metadata
- Download URL: cryptonator-0.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12d360b0a48c1363ab177cc0c5f003aeeb916f39effffe709f0f1c767f5ece03 |
|
MD5 | 43c7a92481c84d52deeb3dfc0e3dc094 |
|
BLAKE2b-256 | c1b48888f66a888a5d1f25971ff2eac984ec0ef6c7adde7074b88a85b137e8b4 |