Skip to main content

readonly implementation of fsspec for IPFS

Project description

ipfsspec

A readonly implementation of fsspec for IPFS.

Installation

You can install ipfsspec directly from git with the following command:

pip install ipfsspec

Usage

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 uses IPIP-280 to determine which gateway to use. If you have a current installation of an IPFS node (e.g. kubo, IPFS Desktop etc...), you should be fine. In case you want to use a different gateway, you can use any of the methods specified in IPIP-280, e.g.:

  • create the file ~/.ipfs/gateway with the gateway address as first line
  • define the environment variable IPFS_GATEWAY to the gateway address
  • create the file /etc/ipfs/gateway with the gateway address as first line

No matter which option you use, the gateway has to be specified as an HTTP(S) url, e.g.: http://127.0.0.1:8080.

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.5.1.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

ipfsspec-0.5.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file ipfsspec-0.5.1.tar.gz.

File metadata

  • Download URL: ipfsspec-0.5.1.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for ipfsspec-0.5.1.tar.gz
Algorithm Hash digest
SHA256 277967a5cb360e4e8d0c8751a8e4c7cffa90e148558371bc727c42adeecf4be2
MD5 0a665ac9b21d0ef547a65f15b1455d19
BLAKE2b-256 263da302514cc6ff893f25d09659f4683b0ecbfaae6f44c69fe406ba0dbec7ec

See more details on using hashes here.

Provenance

File details

Details for the file ipfsspec-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: ipfsspec-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for ipfsspec-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e90f4d10bc3ad65d61e9debf7b39050144075e3dcc35cd6d29a74ff97d9a350e
MD5 3aad5f40adc1efd79505d95dab8e0dd2
BLAKE2b-256 b8c42cad3fcbd86d520013a8a02823813da677cd535d274d0291cb835c9c3d9b

See more details on using hashes here.

Provenance

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