Skip to main content

Pinata-Python

Unofficial IPFS python library for interacting with Pinata APIs

Installation

Run the following to install:

pip install Pinata-Python

Usage

  1. Register an account on Pinata
  2. Create a new api key on api keys page
  3. Copy your api key, api secret and secret key to be used below.
from pinata import Pinata

pinata = Pinata(ap_key, secret_key, access_token)

Pin a file

To upload your file to Pinata, you can either provide:

  1. Directory path of the file you want to upload
  2. File itself as a Byte Stream, eg. If from flask request:
file = request.files["file_name"]

Finally,

from pinata import Pinata

pinata = Pinata(ap_key, secret_key, access_token)

response = pinata.pin_file(file)
print(response)

Unpin a file

To unpin a file, you will need the file's IpfsHash.

from pinata import Pinata

pinata = Pinata(ap_key, secret_key, access_token)

response = pinata.unpin_file(ipfs_hash)
print(response)

Get all pins

If you want to get all pins in your account:

from pinata import Pinata

pinata = Pinata(ap_key, secret_key, access_token)

response = pinata.get_pins()
print(response)

Metadata

Release files for pinata 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pinata 0.0.1
File Size Uploaded Provenance Actions
pinata-0.0.1.tar.gz 2.7 kB Without provenance Details for pinata-0.0.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pinata 0.0.1
File Interpreter ABI Platform Actions
pinata-0.0.1-py3-none-any.whl Python 3 none any Details for pinata-0.0.1-py3-none-any.whl
Pinata-0.0.1-py3-none-any.whl Python 3 none any Details for Pinata-0.0.1-py3-none-any.whl

Total release size: 9.1 kB

Release files / pinata-0.0.1.tar.gz

Download URL pinata-0.0.1.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
aa6c39900bc00b2c88d05325c547198cc6b0da3cb9248c9e8014bc42c3d66ac1
BLAKE2b-256 checksum
How to use checksums
19151e41f0ca79450b01a9380fe72f8bc01a1432a245534a921e1d6712371fa4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.10

Release files / pinata-0.0.1-py3-none-any.whl

Download URL pinata-0.0.1-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
72d19a95455b7e3c2f56574ab551f7f6a9c9d9ae3441263d13f90e291b0fb829
BLAKE2b-256 checksum
How to use checksums
be499866969f5ac5cfc15164d62a1807580a0ad50ca71f4ba6fc7b92d02de382
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.10

Release files / Pinata-0.0.1-py3-none-any.whl

Download URL Pinata-0.0.1-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
356402544ac9bb32a011466cd2b9d834bb9979d5b147f01ba4cf6bb7940869f7
BLAKE2b-256 checksum
How to use checksums
c5d6764bbb463d1455a7d9ea1f87670919f8094aae15c7481d889653b2a43511
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.10

Security for pinata 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

3 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page