Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A simple wrapper for the cryptonator exchange rate API.

Project Description

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

Release History

This version
History Node

0.0.2

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
cryptonator-0.0.2.tar.gz
(3.7 kB) Copy SHA256 Hash SHA256
Source None Nov 25, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting