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

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.2
File Size Uploaded Provenance Actions
ipfs_pay_to_pin_client-2.0.2.tar.gz 6.6 kB With provenance Details for ipfs_pay_to_pin_client-2.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 14.0 kB

Release files / ipfs_pay_to_pin_client-2.0.2.tar.gz

Download URL ipfs_pay_to_pin_client-2.0.2.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
45678a67867fd476ca32ef2ef10f137a3546deadacfa707bfa280b9cc77b9894
BLAKE2b-256 checksum
How to use checksums
b7c4f31cce87221302305a2d1983647b88b5d6e9c5aa9268b4fd8d7f3664e45e
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 23, 2026.

Transparency log

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

Download URL ipfs_pay_to_pin_client-2.0.2-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8efe5a7506301e9de1cc03b07ea3329f6387121c481fe65815c0bca079aef0f
BLAKE2b-256 checksum
How to use checksums
f18e60b4bea83bc03412dba0bc9fc39595d53d8960ca80f35268b630a540a146
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 23, 2026.

Transparency log

Security for ipfs-pay-to-pin-client 2.0.2

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.2.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 23, 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