GithubHelp home page GithubHelp logo

financex / blocktrail-sdk-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blocktrail/blocktrail-sdk-python

0.0 2.0 0.0 428 KB

Python BlockTrail's Developer Friendly SDK for the BlockTrail API

License: MIT License

Python 100.00%

blocktrail-sdk-python's Introduction

BlockTrail Python SDK

This is the BlockTrail Python SDK. This SDK contains methods for easily interacting with the BlockTrail API. Below are examples to get you started. For additional examples, please see our official documentation at https://www.blocktrail.com/api/docs/lang/python

Latest Stable Version Build Status

IMPORTANT! FLOATS ARE EVIL!!

As is best practice with financial data, The API returns all values as an integer, the Bitcoin value in Satoshi's.

The BlockTrail SDK has some easy to use functions to do this for you, we recommend using these and we also strongly recommend doing all Bitcoin calculation and storing of data in integers and only convert to/from Bitcoin float values for displaying it to the user.

import blocktrail

print "123456789 Satoshi to BTC: ", blocktrail.to_btc(123456789)
print "1.23456789 BTC to Satoshi: ", blocktrail.to_satoshi(1.23456789)

A bit more about this can be found in our documentation.

Installation

You can install the package through Pypi (https://pypi.python.org/pypi/blocktrail-sdk).

$ pip install blocktrail-sdk

or you can use setuptools

$ python setup.py build
$ python setup.py install

one of the dependancies, pycrypto needs to be compiled and requires the python dev headers so make sure you have those installed.

$ apt-get install python-dev

Python Versions

Python 2.7 is thoroughly tested. Python 3.2 is not supported by the future library, so atm we don't support it either. Python 3.3 and 3.4 unit tests pass, but it needs some testing...

Dependancies

The following dependancies are required / installed:

  • httpsig (for signing our requests to the API)
  • pycrypto (for crypto stuff)
  • requests (for doing the requests to the API)
  • future (for supporting both python 2 and 3)
  • six (for supporting both python 2 and 3)

Usage

Please visit our official documentation at https://www.blocktrail.com/api/docs/lang/python for the usage.

Support and Feedback

Be sure to visit the BlockTrail API official documentation website for additional information about our API.

If you find a bug, please submit the issue in Github directly. BlockTrail-PHP-SDK Issues

As always, if you need additional assistance, drop us a note at [email protected].

Unit Tests

Unit Tests are created with PyUnit and can be ran with python setup.py test

License

The BlockTrail Python SDK is released under the terms of the MIT license. See LICENCE.md for more information or see http://opensource.org/licenses/MIT.

blocktrail-sdk-python's People

Contributors

rubensayshi avatar oacdesigns avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.