This Python package is the official reference client for the Block.io payments API. To use this, you will need the Dogecoin, Bitcoin, or Litecoin API key(s) from Block.io. Go ahead, sign up :)
Using virtualenv is recommended when installing Python packages.
Install the package using pip
:
pip install block-io
It's super easy to get started. In your Python shell, do:
from block_io import BlockIo
block_io = BlockIo('API KEY', 'SECRET PIN', API_VERSION)
# print the account balance
print block_io.get_balance()
# print all addresses on this account
print block_io.get_my_addresses()
# print the response of a withdrawal request
print block_io.withdraw(from_labels='default', to_label='destLabel', amount='50.0')
For more information, see Python API Docs. This Python client provides a mapping for all methods listed on the Block.io API site.
You can install it like so on Windows: "pip install block-io"
Now regarding the vcvarsall.bat error -- that error is due to the fact that pycrypto library is being compiled when you're trying to install the block-io library.
The issue here is the missing MinGW32 compiler in Windows. You can install it from here. Get the installer, install all the packages the install shows for MinGW32.
After that, add the following to the PATH environment variable in your Control Panel -> System -> Advanced Settings:
C:\MinGW\bin\;C:\MinGW\mingw32\bin\;C:\MinGW\msys\1.0\bin\;C:\MinGW\msys\1.0\sbin\;
Once this is done, go to C:\Python3.4\Lib\distutils, and create a file calls "distutils.cfg" with the following content:
[build]
compiler=mingw32
Now exit your Command Prompt or Python IDE, go to Command Prompt again, type "pip install block-io".
- Fork it ( https://github.com/BlockIo/block_io-python/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request