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.2.tar.gz
(1.8 kB
view details)
Built Distribution
File details
Details for the file polywrap-0.1.2.tar.gz
.
File metadata
- Download URL: polywrap-0.1.2.tar.gz
- Upload date:
- Size: 1.8 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 | d41cbf5436df0223c5e064abf4b24cc7e5224fc5948f06d1159ffb455f11288e |
|
MD5 | a2a888410ec2ec8ca37f467cc9696701 |
|
BLAKE2b-256 | a91c8f87d255673c6116b4b588df098ff39351937e0e02e2930c2c18ff12ef4e |
File details
Details for the file polywrap-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: polywrap-0.1.2-py3-none-any.whl
- Upload date:
- Size: 2.3 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 | 292a754c97c75506f101e8007ea369554a25269778b60512c22eb010868bc0ef |
|
MD5 | b4dc98cb8ec90f52ef84ccacf43a1e00 |
|
BLAKE2b-256 | 4701858a5d05004018796891965e85afb9a4ff8f57d056ea96c34df36ca71dd1 |