Native Python access to IPFS in Jupyter Notebooks
In a previous post, we discussed using the new InterPlanetary File System (IPFS) protocol as a way to load data into Jupyter Notebooks. After experimenting with our previous example code for using IPFS, we decided that using IPFS would be more organic in a Notebook if you could use it from Python as a native library. The jStart team spent a few weeks contributing to the py-ipfs-api project, which creates Python language bindings for interfacing with a Node in the IPFS network. This means that values pulled from the IPFS network are now Python strings or dictionaries and can be used within more complex Python programs as variables.
The IBM jStart contribution to the py-ipfs-api included writing extensive documentation, tests, and extending the functionality of the library to more closely align with the ipfs specification for client libraries.
We’ve revamped our previous IPFS Notebook Example to use the new Python client instead of the old thin wrapper around the IPFS CLI, though we still need part of the old code to install an IPFS daemon on the notebook server. You can get a copy of it here.