plugins.aea-cli-ipfs.aea_
cli_
ipfs.ipfs_
utils
Ipfs utils for ipfs cli command
.
IPFSDaemon Objects
Set up the IPFS daemon.
Raises:
Exception
: if IPFS is not installed.
__
init__
Initialise IPFS daemon.
is_
started
Check daemon was started.
start
Run the ipfs daemon.
stop
Terminate the ipfs daemon.
BaseIPFSToolException Objects
Base ipfs tool exception.
RemoveError Objects
Exception on remove.
PublishError Objects
Exception on publish.
NodeError Objects
Exception for node connection check.
DownloadError Objects
Exception on download failed.
IPFSTool Objects
IPFS tool to add, publish, remove, download directories.
__
init__
Init tool.
Arguments:
client_options
: dict, options for ipfshttpclient instance.
add
Add directory to ipfs.
It wraps into directory.
Arguments:
dir_path
: str, path to dir to publishpin
: bool, pin object or not
Returns:
dir name published, hash, list of items processed
remove
Remove dir added by it's hash.
Arguments:
hash_id
: str. hash of dir to remove
Returns:
dict with unlinked items.
download
Download dir by it's hash.
Arguments:
hash_id
: str. hash of file to downloadtarget_dir
: str. directory to place downloadedfix_path
: bool. default True. on download don't wrap result in to hash_id directory.
publish
Publish directory by it's hash id.
Arguments:
hash_id
: hash of the directory to publish.
Returns:
dict of names it was publish for.
chec_
ipfs_
node_
running
Check ipfs node running.