https://github.com/pan-efs/pinata-python
An easy to use and fully-featured Python API for pinata.cloud library.
https://github.com/pan-efs/pinata-python
blockchain ipfs pinata python3
Last synced: 6 days ago
JSON representation
An easy to use and fully-featured Python API for pinata.cloud library.
- Host: GitHub
- URL: https://github.com/pan-efs/pinata-python
- Owner: pan-efs
- License: mit
- Created: 2022-04-25T08:49:55.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-12T16:43:06.000Z (over 3 years ago)
- Last Synced: 2025-09-23T00:46:09.326Z (4 months ago)
- Topics: blockchain, ipfs, pinata, python3
- Language: Python
- Homepage:
- Size: 1000 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# pinata-python
[]()

[](https://www.python.org/downloads/release/python-380/)

> An easy to use and fully-featured Python API for [pinata.cloud.](https://www.pinata.cloud/)
## Installation
It's encouraged to read the [notes](https://github.com/pan-efs/pinata-python#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](https://github.com/pan-efs/pinata-python/blob/main/docs/_build/rinoh/pinata-python.pdf) 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
```python
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](https://github.com/pan-efs/pinata-python/tree/main/pinata_python/tests) 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](https://docs.pinata.cloud/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! :star:
You got it! Feel free to leave a star if you found the package useful or you learned something new at least.