Skip to content

Commit

Permalink
Make ipfshhtpclient an optional library / backend for ethpm
Browse files Browse the repository at this point in the history
  • Loading branch information
fselmo committed Nov 22, 2022
1 parent 92325e2 commit 30bc908
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 10 additions & 1 deletion docs/ethpm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,16 @@ BaseURIBackend
IPFS
~~~~

``Py-EthPM`` has multiple backends available to fetch/pin files to IPFS. The desired backend can be set via the environment variable: ``ETHPM_IPFS_BACKEND_CLASS``.
``Py-EthPM`` has multiple backends available to fetch/pin files to IPFS.
The IPFS backends rely on the now-unmaintained ``ipfshttpclient`` library. Because of
this, they are opt-in and may be installed via the ``ipfs`` web3 install extra.

.. code-block:: bash
$ pip install "web3[ipfs]"
The desired backend can be set via the environment variable: ``ETHPM_IPFS_BACKEND_CLASS``.

- ``InfuraIPFSBackend`` (default)
- `https://ipfs.infura.io`
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,16 @@
"pluggy==0.13.1",
"when-changed>=0.3.0",
],
"ipfs": [
"ipfshttpclient==0.8.0a2",
],
}

extras_require["dev"] = (
extras_require["tester"]
+ extras_require["linter"]
+ extras_require["docs"]
+ extras_require["ipfs"]
+ extras_require["dev"]
)

Expand All @@ -82,7 +86,6 @@
"eth-typing>=3.0.0",
"eth-utils>=2.0.0",
"hexbytes>=0.1.0",
"ipfshttpclient==0.8.0a2",
"jsonschema>=4.0.0",
"lru-dict>=1.1.6",
"protobuf>=4.21.6",
Expand Down

0 comments on commit 30bc908

Please sign in to comment.