decoration back

Python + Bitcoin Cash = ๐Ÿ˜

merc1er
merc1er
December 10 2019

This article shows off how easy it is for a developer to integrate Bitcoin Cash payments in their app with the Python programming language using a tool called BitCash.

Developing with Bitcoin is hard... ๐Ÿ˜ฐ

I love Python for its simplicity and intuitiveness.

By contrast, interacting with Bitcoin through software can often be complex and intimidating. You are usually required to know how Bitcoin works to even start using a library.

For example, in the "getting started" doc page of one of the most popular BCH libraries you are confronted with terms like ECPair, HDNode, Mnemonic or Schnorr.

I believe that, in the future, most people should not have to be familiar with these technical concepts to interact with Bitcoin.

...unless you have the right tools! ๐Ÿ”จ

I came across an amazing Python library[2] that removes all this complexity and allows users to integrate Bitcoin inside their Python app easily. The subtitle reads:

Bit is Pythonโ€™s fastest Bitcoin library and was designed from the beginning to feel intuitive, be effortless to use, and have readable source code. It is heavily inspired by Requests and Keras.

As a requests (Python HTTP library) user myself, I think the comparison is excellent: most requests users have no idea how an HTTP request works under the hood. But the library is so well designed that it is not required to know this to be able to use it effectively.

Let's get our hands dirty

Now, this "Bit" library got forked into BitCash to be compatible with Bitcoin Cash. Let me show you how easy it is to use it:

First, you want to install it using PyPi. To do so, open a terminal and run the following command: