Python SDK
Installation
To install the Gateway3 SDK, use the following command:
pip install gw3
Index
- class GW3Client
class GW3Client
GW3Client represents a Gateway3 client for interacting with the Gateway3.
class GW3Client:
# contains filtered or unexported fields
def init
def GW3Client.__init__(access_key: str, access_secret: str)
init creates a new GW3Client instance with the provided access key and access secret.
def get_ipfs
def GW3Client.get_ipfs(hash)
get_ipfs retrieves data from the IPFS network for the given cid.
def get_ipns
def GW3Client.get_ipns(name)
get_ipns retrieves data from the IPFS network for the given IPNS.
def upload
def GW3Client.upload(data)
upload uploads the given data to Gateway3 and returns the corresponding IPFS hash.
def dag_add
def GW3Client.dag_add(root, path, data)
dag_add adds new data to an existing dag and returns the new dag root.
def dag_rm
def GW3Client.dag_rm(root, path)
dag_rm removes a path from an existing dag and returns the new dag root.
def pin
def GW3Client.pin(cid)
pin requests Gateway3 to pin the given CID.
def unpin
def GW3Client.unpin(cid)
unpin requests Gateway3 to unpin the given CID.
def create_ipns
def GW3Client.create_ipns(cid)
create_ipns creates a new IPNS record and binds it to the given CID.
def update_ipns
def GW3Client.update_ipns(name, cid)
update_ipns updates the value for the IPNS record specified by the given name.