Polywrap Python SDK
Project description
Polywrap
This package contains the Polywrap Python SDK.
Installation
Install the package with pip:
pip install polywrap
Quickstart
Imports
>>> from polywrap import ( ... Uri, ... ClientConfig, ... PolywrapClient, ... PolywrapClientConfigBuilder, ... sys_bundle, ... web3_bundle ... )
Configure and Instantiate
>>> builder = ( ... PolywrapClientConfigBuilder() ... .add_bundle(sys_bundle) ... .add_bundle(web3_bundle) ... ) >>> config = builder.build() >>> client = PolywrapClient(config)
Invocation
Invoke a wrapper.
>>> uri = Uri.from_str( ... 'wrapscan.io/polywrap/ipfs-http-client' ... ) >>> args = { ... "cid": "QmZ4d7KWCtH3xfWFwcdRXEkjZJdYNwonrCwUckGF1gRAH9", ... "ipfsProvider": "https://ipfs.io", ... } >>> result = client.invoke(uri=uri, method="cat", args=args, encode_result=False) >>> assert result.startswith(b"<svg")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
polywrap-0.1.0b7.tar.gz
(1.8 kB
view hashes)
Built Distribution
Close
Hashes for polywrap-0.1.0b7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23793f180d483afdfb1b19d02020f65e5cd8ce1e1c1a28dc9c936b70bf86a9ee |
|
MD5 | 3156fa8ef9f2b333fb8f4e8da04942e3 |
|
BLAKE2b-256 | b6578f38319ff5dff6a9d830c3ac526b5a12c75e8a05fcf62e1233c75a1a9eb1 |