Skip to main content

IPFS Pay-to-Pin Python SDK (ipfs-pay-to-pin-client)

Python client library for pinning files to IPFS via standard HTTP 402 Payment Required microUSDC micropayments across Base L2, Solana, and Algorand.

Installation

# Basic install
pip install ipfs-pay-to-pin-client

# Install with EVM support (Base L2 gasless EIP-3009)
pip install "ipfs-pay-to-pin-client[evm]"

# Install with all multi-chain signers
pip install "ipfs-pay-to-pin-client[all]"

Usage

from ipfs_pay_to_pin_client import IpfsPayToPinClient

# Option A: Base L2 / EVM Private Key (Gasless EIP-3009 transfer)
client = IpfsPayToPinClient(
    gateway_url="https://pay-to-pin.duckdns.org",
    evm_private_key="0xYourBaseEvmPrivateKey..."
)

# Option B: Solana Wallet
client = IpfsPayToPinClient(
    gateway_url="https://pay-to-pin.duckdns.org",
    solana_private_key="YourSolanaBase58PrivateKey..."
)

# Option C: Algorand Wallet
client = IpfsPayToPinClient(
    gateway_url="https://pay-to-pin.duckdns.org",
    sender_mnemonic="your twenty five word algorand account mnemonic phrase goes here..."
)

# Pin a file with optional max price safety limit (in USDC)
response = client.pin_file("path/to/my-file.pdf", max_price_usdc=1.0)
print(f"Pinned CID: {response.cid}")
print(f"Pin Expires At: {response.pin_expires_at}")

# Pin raw bytes directly
raw_data = b"Hello, decentralized storage!"
response = client.pin_bytes(raw_data, filename="hello.txt")

# Check status of an existing CID
status = client.get_status(response.cid)
print(status)

Features

  • Automatic multi-chain x402 402 Payment Required challenge handler
  • Native support for Base L2 (EIP-3009), Solana Mainnet, and Algorand Mainnet
  • Automated network steering prioritizing zero-gas / lowest-fee options
  • Maximum price ceiling enforcement (max_price_usdc)

Metadata

Release files for ipfs-pay-to-pin-client 2.1.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 ipfs-pay-to-pin-client 2.1.1
File Size Uploaded Provenance Actions
ipfs_pay_to_pin_client-2.1.1.tar.gz 7.3 kB With provenance Details for ipfs_pay_to_pin_client-2.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ipfs-pay-to-pin-client 2.1.1
File Interpreter ABI Platform Actions
ipfs_pay_to_pin_client-2.1.1-py3-none-any.whl Python 3 none any Details for ipfs_pay_to_pin_client-2.1.1-py3-none-any.whl

Total release size: 14.8 kB

Release files / ipfs_pay_to_pin_client-2.1.1.tar.gz

Download URL ipfs_pay_to_pin_client-2.1.1.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7ad10ba7c79fca86f3daf05735ba2d8a6bc60667715069ad451a84f17a719985
BLAKE2b-256 checksum
How to use checksums
886aa4e0397a4b79d69645f0f9f1b3438bdb734b5a9d674a326d2fa0b679eacc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release files / ipfs_pay_to_pin_client-2.1.1-py3-none-any.whl

Download URL ipfs_pay_to_pin_client-2.1.1-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e12cd8dc5eff242eb72ec2881bd551101c84b8db37f337020f2beaab12c2b18
BLAKE2b-256 checksum
How to use checksums
bb939aaa94d3a57a10a7317a9960104c90582a45c830f4fea0aa66978cf577ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Security for ipfs-pay-to-pin-client 2.1.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ipfs_pay_to_pin_client-2.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

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.

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