Skip to main content

readonly implementation of fsspec for IPFS

Project description

ipfsspec

A readonly implementation of fsspec for IPFS.

This project is currently very rudimentaty. It is not yet optimized for efficiency and is not yet feature complete. However it should be enough to list directory contents and to retrieve files from ipfs:// resources via fsspec. A simple hello worlds would look like:

import fsspec

with fsspec.open("ipfs://QmZ4tDuvesekSs4qM5ZBKpXiZGun7S2CYtEZRB3DYXkjGx", "r") as f:
    print(f.read())

The current implementation uses a HTTP gateway to access the data. It tries to use a local one (which is expected to be found at http://127.0.0.1:8080) and falls back to ipfs.io if the local gateway is not available.

You can modify the list of gateways using the space separated environment variable IPFSSPEC_GATEWAYS.

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

ipfsspec-0.4.0.tar.gz (27.6 kB view hashes)

Uploaded Source

Built Distribution

ipfsspec-0.4.0-py3-none-any.whl (10.0 kB view hashes)

Uploaded Python 3

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