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

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.0
File Size Uploaded Provenance Actions
ipfs_pay_to_pin_client-2.0.0.tar.gz 5.3 kB With provenance Details for ipfs_pay_to_pin_client-2.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 11.5 kB

Release files / ipfs_pay_to_pin_client-2.0.0.tar.gz

Download URL ipfs_pay_to_pin_client-2.0.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8845b7bd9c7c7c070e6d34d5406b50f0e804b301c0d230ec3f020c8c48fb704c
BLAKE2b-256 checksum
How to use checksums
9332b6eb0ecf9a41f2c937a156db3840e7769c6537c46238b5c29f5aac55c1e3
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 12, 2026.

Transparency log

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

Download URL ipfs_pay_to_pin_client-2.0.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
876427bda79d939687329be5a9ef2882f375b154a18d1bd2f92fb5ddd6b39639
BLAKE2b-256 checksum
How to use checksums
29e0d255d71db286077e3d8c3cd779009eca5348ccd6868b490ab32e259d2936
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 12, 2026.

Transparency log

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

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.0.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 12, 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