pan-efs / pinata-python

An easy to use and fully-featured Python API for pinata.cloud library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pinata-python

AUR maintainer GitHub Workflow Status Python 3.8 GitHub repo size

An easy to use and fully-featured Python API for pinata.cloud.

Installation

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

Documentation

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`
PDF `~/pinata-python$ sphinx-build -b rinoh docs/source docs/_build/rinoh`

Example

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)

Unit Tests

~/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.

Notes

  • 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.

Contributing

  1. For problems, you could kindly open an issue and label it with bug.

  2. For ideas or improvements, you could kindly open an issue and label it with enhancement.

Star it! ⭐

You got it! Feel free to leave a star if you found the package useful or you learned something new at least.

About

An easy to use and fully-featured Python API for pinata.cloud library.

License:MIT License


Languages

Language:Python 99.8%Language:Shell 0.2%