IPFS Pay-to-Pin Python SDK (ipfs-pay-to-pin-client)
Python client library for pinning files to IPFS via the standard 402 Payment Required microUSDC gateway on Algorand.
Installation
pip install ipfs-pay-to-pin-client
Usage
from ipfs_pay_to_pin_client import IpfsPayToPinClient
# Initialize client with Gateway URL and Algorand 25-word mnemonic
client = IpfsPayToPinClient(
gateway_url="https://your-pay-to-pin-gateway.com",
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 x402 402 Payment Required challenge handler
- Algorand microUSDC settlement
- Account rekey detection for security
- Maximum price ceiling enforcement (
max_price_usdc)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ipfs_pay_to_pin_client-0.2.0.tar.gz.
File metadata
- Download URL: ipfs_pay_to_pin_client-0.2.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21d1f20c457796f1cbfa4f09cd58417005dc16bca7bdea53d9da4b236cb385f0
|
|
| MD5 |
7061b8be9c7113e3eccb8e014c69417a
|
|
| BLAKE2b-256 |
9759955b6783deb07a852ef68ae74c1fe9a0aa3e730b7da2d5817ff3eff4fd3c
|
Provenance
The following attestation bundles were made for ipfs_pay_to_pin_client-0.2.0.tar.gz:
Publisher:
post-release.yml on IcanBENCHurCAT/ipfs-pay-to-pin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ipfs_pay_to_pin_client-0.2.0.tar.gz -
Subject digest:
21d1f20c457796f1cbfa4f09cd58417005dc16bca7bdea53d9da4b236cb385f0 - Sigstore transparency entry: 2404725843
- Sigstore integration time:
-
Permalink:
IcanBENCHurCAT/ipfs-pay-to-pin@211b7aa65f7cc0bf779d3562f3c5bc2911670e72 -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/IcanBENCHurCAT
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
post-release.yml@211b7aa65f7cc0bf779d3562f3c5bc2911670e72 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ipfs_pay_to_pin_client-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ipfs_pay_to_pin_client-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f8d4c7eb371013fe3b014e1792b67158fdf0b781e38e6d7e52583d88d8b8324
|
|
| MD5 |
038a42ff63db7f63c3479ab3a434ca89
|
|
| BLAKE2b-256 |
207dc896b8ff8f6a743d463f6b53ea9c68ea0a248422cf2954ade85d1f8c48d2
|
Provenance
The following attestation bundles were made for ipfs_pay_to_pin_client-0.2.0-py3-none-any.whl:
Publisher:
post-release.yml on IcanBENCHurCAT/ipfs-pay-to-pin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ipfs_pay_to_pin_client-0.2.0-py3-none-any.whl -
Subject digest:
3f8d4c7eb371013fe3b014e1792b67158fdf0b781e38e6d7e52583d88d8b8324 - Sigstore transparency entry: 2404725942
- Sigstore integration time:
-
Permalink:
IcanBENCHurCAT/ipfs-pay-to-pin@211b7aa65f7cc0bf779d3562f3c5bc2911670e72 -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/IcanBENCHurCAT
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
post-release.yml@211b7aa65f7cc0bf779d3562f3c5bc2911670e72 -
Trigger Event:
release
-
Statement type: