Hi there,
While trying to find a simple solution to upload a whole directory to local ipfs daemon using ipfs-http-client 0.7.0 python module:
import ipfshttpclient
def ipfs_add(content_path):
client = ipfshttpclient.connect('/ip4/127.0.0.1/tcp/5001')
res = client.add(content_path, recursive=True)
print(res)
I get an incompatibility error between api for python module and kubo api number;
File "/Users/kalou/dev/py/qtbittorrent/./get-torrents-seeding-hashes.py", line 37, in ipfs_add
client = ipfshttpclient.connect('/ip4/127.0.0.1/tcp/5001')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kalou/dev/py/qtbittorrent/venv/lib/python3.12/site-packages/ipfshttpclient/client/__init__.py", line 119, in connect
assert_version(client.apply_workarounds()["Version"])
File "/Users/kalou/dev/py/qtbittorrent/venv/lib/python3.12/site-packages/ipfshttpclient/client/__init__.py", line 69, in assert_version
raise exceptions.VersionMismatch(version, minimum, maximum)
ipfshttpclient.exceptions.VersionMismatch: Unsupported daemon version '0.28.0' (not in range: 0.4.23 ≤ … < 0.8.0)
Is there any newer solution available for python ?
May I better fork an ipfs add process using “os python module” ?