No project description provided
Project description
polywrap-client
Python implementation of the polywrap client.
Usage
Configure and Instantiate
Use the polywrap-uri-resolvers
package to configure resolver and build config for the client.
from polywrap_uri_resolvers import FsUriResolver, SimpleFileReader
config = ClientConfig(
resolver=FsUriResolver(file_reader=SimpleFileReader())
)
client = PolywrapClient(config)
Invoke
Invoke a wrapper.
uri = Uri.from_str(
'fs/<path to wrapper>' # Example uses simple math wrapper
)
args = {
"arg1": "123", # The base number
"obj": {
"prop1": "1000", # multiply the base number by this factor
},
}
options: InvokerOptions[UriPackageOrWrapper] = InvokerOptions(
uri=uri, method="method", args=args, encode_result=False
)
result = await client.invoke(options)
assert result == "123000"
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
Built Distribution
Close
Hashes for polywrap_client-0.1.0a25-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96d23e7cf69ff3175b8fe2019c56884a5cfc9b1d3904f59e612a6b3c72090045 |
|
MD5 | 41c5e835cf16830719b9da715827a9e6 |
|
BLAKE2b-256 | 41621c66a248668b9365bec537021801ac1caa6e46b5a55bf2db140345aee1c4 |