Skip to content

Latest commit

 

History

History
76 lines (57 loc) · 2.49 KB

README.md

File metadata and controls

76 lines (57 loc) · 2.49 KB

Public Release Announcement

Polywrap Python Client

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.

Quickstart

Install the package

pip install polywrap

Import necessary packages

from polywrap import (
    Uri,
    ClientConfig,
    PolywrapClient,
    PolywrapClientConfigBuilder,
    sys_bundle,
    web3_bundle
)

Configure and Instantiate the client

builder = (
    PolywrapClientConfigBuilder()
    .add_bundle(sys_bundle)
    .add_bundle(web3_bundle)
)
config = builder.build()
client = PolywrapClient(config)

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")

Working Features

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.

Feedback & Contributions

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.

Contact Us:

Join our discord and ask your questions right away!

Resources