An easy to use and fully-featured Python API for pinata.cloud.
It's encouraged to read the notes before installation.
Install via PyPi:
pip install pinata-python==1.0.0
Install from source:
pip install git+https://github.com/pan-efs/pinata-python.git
Read the official documentation as PDF
file. Examples can be found as well.
Build docs
HTML
`~/pinata-python$ sphinx-build -b html docs/source/ docs/build/html`from pinata_python.pinning import Pinning
your_pinata_api_key = '...'
your_pinata_api_secret = '...'
pinata = Pinning(PINATA_API_KEY=your_pinata_api_key, PINATA_API_SECRET=your_pinata_api_secret)
your_filepath = '...'
response = pinata.pin_file_to_ipfs(filepath)
print(response)
~/pinata-python$ bash run_tests.sh
There are some tests which have been skipped. Please refer to tests folder in order to comprehend why.
Note: The API has not been tested for the professional plan. Yet, it doesn't mean that it doesn't work for it.
-
The pinata-python API does not support Pinata Submarine API. Also, it has been built before Pinata Submarine API was released.
-
The pinata-python API is unofficial. There is no any kind of collaboration between the author and pinata.
-
The pinata-python API has been developed for recreational and personal usage reasons. There is no any kind of financial interest.
-
The pinata-python API is distributed under MIT licence.
-
For problems, you could kindly open an issue and label it with
bug
. -
For ideas or improvements, you could kindly open an issue and label it with
enhancement
.
You got it! Feel free to leave a star if you found the package useful or you learned something new at least.