Polywrap is a protocol for building and executing composable wrappers for any web3 protocol. Polywrap Python Client is a Python library that allows you to easily execute Polywrap Wrappers.
pip install polywrap
from polywrap import (
Uri,
ClientConfig,
PolywrapClient,
PolywrapClientConfigBuilder,
sys_bundle,
web3_bundle
)
builder = (
PolywrapClientConfigBuilder()
.add_bundle(sys_bundle)
.add_bundle(web3_bundle)
)
config = builder.build()
client = PolywrapClient(config)
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")
Here you can see which features have been implemented on each language client, and make the decision of which one to use for your project.
Bugs and feature requests can be made via GitHub issues. Be aware that these issues are not private, so take care when providing output to make sure you are not disclosing any personal informations.
Pull requests are also welcome via git.
New contributors should read the contributor guide to get started. Folk who already have experience contributing to open source projects may not need the full guide but should still use the pull request checklist to make things easy for everyone. Polywrap Python Client contributors are asked to adhere to the Python Community Code of Conduct.
Join our discord and ask your questions right away!