Polywrap Client to invoke Polywrap Wrappers
Project description
Polywrap Client
This package contains the implementation of polywrap python client.
Quickstart
Imports
>>> from polywrap_core import Uri, ClientConfig >>> from polywrap_client import PolywrapClient >>> from polywrap_client_config_builder import PolywrapClientConfigBuilder >>> from polywrap_sys_config_bundle import sys_bundle >>> from polywrap_web3_config_bundle import 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_client-0.1.2.tar.gz
(4.0 kB
view details)
Built Distribution
File details
Details for the file polywrap_client-0.1.2.tar.gz
.
File metadata
- Download URL: polywrap_client-0.1.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.13 Darwin/22.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 484d0250d47368389955f9c3be9aedc6836f84a1d2ea4561ac04affe3b8d3ad9 |
|
MD5 | bfd405e77d1a2c083e43e3cccdd66fb4 |
|
BLAKE2b-256 | eb5a0f318d12d5d2d1d188c716b0c56255674912e0bf0d0969eb4ecd5d0f82c9 |
File details
Details for the file polywrap_client-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: polywrap_client-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.13 Darwin/22.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c91d7d4df2ef71f4599f5d436ece6cb12a6ea97c170e537e1f67adf2966fcb92 |
|
MD5 | 5ce5e757a501ca84883283eef3c065d3 |
|
BLAKE2b-256 | 6078b84de8a0c440c90d7f6d3d0915b5562ca01923f3524b71015789e039fdef |