In the IPFS quick start documentation (https://docs.ipfs.io/introduction/usage), the first thing that they teach you is to download the cute cat picture. Use the following code to do this:
$ ipfs cat /ipfs/QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ/cat.jpg >cat.jpg
$ eog cat.jpg
When you run the preceding code, the cat picture will be downloaded and you will get the following as output:
eog is an image viewer in Ubuntu.
To respect the tradition, let's create a Python script to download the preceding image programmatically with Python and name the script download_cute_cat_picture.py:
import ipfsapi
c = ipfsapi.connect()
cute_cat_picture = 'QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ/cat.jpg'
c.get(cute_cat_picture)
After executing this script, the image will be named cat.jpg in your directory.
As you may have noticed, there is a cat.jpg filename...