Skip to main content

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


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)

Uploaded Source

Built Distribution

polywrap-0.1.2-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

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

Hashes for polywrap-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d41cbf5436df0223c5e064abf4b24cc7e5224fc5948f06d1159ffb455f11288e
MD5 a2a888410ec2ec8ca37f467cc9696701
BLAKE2b-256 a91c8f87d255673c6116b4b588df098ff39351937e0e02e2930c2c18ff12ef4e

See more details on using hashes here.

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

Hashes for polywrap-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 292a754c97c75506f101e8007ea369554a25269778b60512c22eb010868bc0ef
MD5 b4dc98cb8ec90f52ef84ccacf43a1e00
BLAKE2b-256 4701858a5d05004018796891965e85afb9a4ff8f57d056ea96c34df36ca71dd1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page