Metadata-Version: 2.1
Name: polywrap
Version: 0.1.0b8
Summary: Polywrap Python SDK
Author: Cesar
Author-email: cesar@polywrap.io
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: polywrap-client (>=0.1.0b8,<0.2.0)
Requires-Dist: polywrap-client-config-builder (>=0.1.0b8,<0.2.0)
Requires-Dist: polywrap-core (>=0.1.0b8,<0.2.0)
Requires-Dist: polywrap-ethereum-wallet (>=0.1.0b8,<0.2.0)
Requires-Dist: polywrap-fs-plugin (>=0.1.0b8,<0.2.0)
Requires-Dist: polywrap-http-plugin (>=0.1.0b8,<0.2.0)
Requires-Dist: polywrap-manifest (>=0.1.0b8,<0.2.0)
Requires-Dist: polywrap-msgpack (>=0.1.0b8,<0.2.0)
Requires-Dist: polywrap-plugin (>=0.1.0b8,<0.2.0)
Requires-Dist: polywrap-sys-config-bundle (>=0.1.0b8,<0.2.0)
Requires-Dist: polywrap-uri-resolvers (>=0.1.0b8,<0.2.0)
Requires-Dist: polywrap-wasm (>=0.1.0b8,<0.2.0)
Requires-Dist: polywrap-web3-config-bundle (>=0.1.0b8,<0.2.0)
Description-Content-Type: text/x-rst

Polywrap
========
This package contains the Polywrap Python SDK.

Installation
============
Install the package with pip:

.. code-block:: bash

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

