Python SDK for Filecoin Onchain Cloud (Synapse)
Project description
Pynapse
Python SDK for Filecoin Onchain Cloud (Synapse).
This project mirrors the JS SDK in FilOzone/synapse-sdk and references the Go implementation in data-preservation-programs/go-synapse for parity.
Status
Work in progress. Parity is being implemented in incremental commits.
Install (dev)
uv venv
uv pip install -e .[test]
PyPI package name: synapse-filecoin-sdk
Python import: pynapse
Install (PyPI)
pip install synapse-filecoin-sdk
Supported Networks
Both Filecoin Mainnet and Calibration testnet are supported:
from pynapse import AsyncSynapse
# Mainnet
synapse = await AsyncSynapse.create(
rpc_url="https://api.node.glif.io/rpc/v1",
chain="mainnet",
private_key=PRIVATE_KEY
)
# Calibration testnet (for testing)
synapse = await AsyncSynapse.create(
rpc_url="https://api.calibration.node.glif.io/rpc/v1",
chain="calibration",
private_key=PRIVATE_KEY
)
See QUICKSTART.md for a full tutorial using Calibration testnet.
CommP / PieceCID
pynapse uses stream-commp from go-fil-commp-hashhash for PieceCID calculation.
Install stream-commp
stream-commp is an external runtime dependency and is not installed by pip.
git clone https://github.com/filecoin-project/go-fil-commp-hashhash.git
cd go-fil-commp-hashhash/cmd/stream-commp
go build -o stream-commp .
Install it to your PATH (for example /usr/local/bin) or set:
export PYNAPSE_COMMP_HELPER=/absolute/path/to/stream-commp
Verify:
stream-commp --help
License
Dual-licensed under Apache-2.0 OR MIT. See LICENSE.md.
Publishing to PyPI
Publishing is automated via GitHub Actions in .github/workflows/publish-pypi.yml.
- In PyPI, create the project (or use an existing one) and configure a Trusted Publisher for this GitHub repository and workflow.
- In GitHub, optionally protect the
pypienvironment for manual approval. - Tag a release and push the tag:
git tag v0.2.0
git push origin v0.2.0
The workflow builds the package, runs twine check, and publishes to PyPI via OIDC (no API token required).
Project details
Release history Release notifications | RSS feed
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 synapse_filecoin_sdk-0.2.0.tar.gz.
File metadata
- Download URL: synapse_filecoin_sdk-0.2.0.tar.gz
- Upload date:
- Size: 233.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bd66a49eaaa09024fe639a6a701c76f0bc2aef754b5a7e8d4ef39b55f9b676a
|
|
| MD5 |
a5a5309d71c1cf5a262d748ebf5e2093
|
|
| BLAKE2b-256 |
58a6f1c3087904204f40539eaf230c71e40120947aee31ae5667764d61d226c4
|
Provenance
The following attestation bundles were made for synapse_filecoin_sdk-0.2.0.tar.gz:
Publisher:
publish-pypi.yml on anjor/pynapse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synapse_filecoin_sdk-0.2.0.tar.gz -
Subject digest:
6bd66a49eaaa09024fe639a6a701c76f0bc2aef754b5a7e8d4ef39b55f9b676a - Sigstore transparency entry: 924317607
- Sigstore integration time:
-
Permalink:
anjor/pynapse@f244503096c55a960a6c3af2f7912d7faa1d0d9b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/anjor
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f244503096c55a960a6c3af2f7912d7faa1d0d9b -
Trigger Event:
push
-
Statement type:
File details
Details for the file synapse_filecoin_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: synapse_filecoin_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 89.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c44ee39b850922e0953647904ac8df982efcb68ff968207e2bb5d70caf859af
|
|
| MD5 |
e58e0db6c131cd2bb4b0811f1e8bc53e
|
|
| BLAKE2b-256 |
c71e28557a4187304b32cd84cd1cff1fb57709201eefef9e48662c8f38bf298a
|
Provenance
The following attestation bundles were made for synapse_filecoin_sdk-0.2.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on anjor/pynapse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synapse_filecoin_sdk-0.2.0-py3-none-any.whl -
Subject digest:
3c44ee39b850922e0953647904ac8df982efcb68ff968207e2bb5d70caf859af - Sigstore transparency entry: 924317609
- Sigstore integration time:
-
Permalink:
anjor/pynapse@f244503096c55a960a6c3af2f7912d7faa1d0d9b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/anjor
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f244503096c55a960a6c3af2f7912d7faa1d0d9b -
Trigger Event:
push
-
Statement type: