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.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.1.2
File Size Uploaded Provenance Actions
ipfs_pay_to_pin_client-2.1.2.tar.gz 7.6 kB With provenance Details for ipfs_pay_to_pin_client-2.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 15.1 kB

Release files / ipfs_pay_to_pin_client-2.1.2.tar.gz

Download URL ipfs_pay_to_pin_client-2.1.2.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
be847df6080543abc181ddb49d2e9a675c1d5c6c42f82f027e0c6194b2a453e4
BLAKE2b-256 checksum
How to use checksums
4e92a23d639444066fc9b6a3a1a3ced980722c26c60ad560a7b81167c0ab52e1
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 30, 2026.

Transparency log

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

Download URL ipfs_pay_to_pin_client-2.1.2-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
738e8085010fb22a70606f190ce524939583bc45d00c1085527d8e54beccb3fd
BLAKE2b-256 checksum
How to use checksums
deca8d81f68516d0d2cafd39ca9c4dd7499cef8cb7860c3b884814814a280486
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 30, 2026.

Transparency log

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