Skip to main content

No project description provided

Project description

Python IPFS CID

Computes IPFS CIDs from Python code.

This library computes the IPFS DAG of the input data and then returns the CID of the root node. This returns the same CID as would be computed by ipfs add <file>.

Example

from py_ipfs_cid import compute_cid
cid: str = compute_cid(b"1234")  # Returns QmTPqcLhVnCtjoYuCZwPzfXcFrUviiPComTepHfEEaGf7g

Current limitations

  • Only supports CID v0
  • Only supports files, not directories
  • Only supports the default IPFS block size (256 KiB)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_ipfs_cid-0.1.0.tar.gz (794.9 kB view hashes)

Uploaded Source

Built Distribution

py_ipfs_cid-0.1.0-cp38-cp38-manylinux_2_28_x86_64.whl (216.6 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page