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.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 ipfs-pay-to-pin-client 2.0.1
File Size Uploaded Provenance Actions
ipfs_pay_to_pin_client-2.0.1.tar.gz 6.6 kB With provenance Details for ipfs_pay_to_pin_client-2.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 14.0 kB

Release files / ipfs_pay_to_pin_client-2.0.1.tar.gz

Download URL ipfs_pay_to_pin_client-2.0.1.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
943e198225ac392c549751330e567966aef24431dd4caff78776701a40a50510
BLAKE2b-256 checksum
How to use checksums
213b1d588af6ccbc91fe442ed397a1003e5252dbed738f779e46ac713e19b12b
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 Aug 14, 2026.

Transparency log

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

Download URL ipfs_pay_to_pin_client-2.0.1-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6138d9ff0110fe53b4f9ce52b2e01ce5ce1c2ed8e6c514fbfcabc7ccb1e3e43
BLAKE2b-256 checksum
How to use checksums
a8803dc09ef70527ece1a529bb302f86fe5767877ea9d928f806a90d665de5b3
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 Aug 14, 2026.

Transparency log

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

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.0.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 Aug 14, 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