Skip to content

Commit 2f16f05

Browse files
committed
readme
1 parent 72ec96f commit 2f16f05

File tree

1 file changed

+31
-24
lines changed

1 file changed

+31
-24
lines changed

README.md

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,18 @@ The client is built following the functionality of the [JavaScript Polywrap Clie
1313

1414
Here you can see which features have been implemented on each language, and make the decision of which one to use for your project.
1515

16-
| Feature | [Python](https://github.com/polywrap/python-client) | [Javascript](https://github.com/polywrap/toolchain) |
17-
| -- | -- | -- |
18-
| Invoke wrappers | yes | yes |
19-
| Subinvoke wrappers | wip | yes |
20-
| Interfaces | pending | yes |
21-
| Env Configuration | | |
22-
| Client Config Builder Package | wip | yes |
23-
| Plugins | tbd | yes |
24-
| Wrap Manifest | WIP | yes |
25-
| Uri Resolution | legacy | refactored |
16+
| Feature | [Python](https://github.com/polywrap/python-client) | [Javascript](https://github.com/polywrap/toolchain) | [Go]() | [Rust](https://github.com/polywrap/rust-client) |
17+
| -- | -- | -- | -- | -- |
18+
| Invoke wrappers | yes | yes | | |
19+
| Subinvoke wrappers | wip | yes | | |
20+
| Interfaces | pending | yes | | |
21+
| Env Configuration | | | | |
22+
| Client Config Builder Package | wip | yes | | |
23+
| Plugins | tbd | yes | | |
24+
| Wrap Manifest | WIP | yes | | |
25+
| Uri Resolution | legacy | refactored | | |
2626
> TODO: Update table above according to test harness and maybe mention other wip clients (go, rust)
2727
28-
29-
3028
# Getting Started:
3129

3230
Have questions or want to get involved? Join our community [Discord](https://discord.polywrap.io) or [open an issue](https://github.com/polywrap/toolchain/issues) on Github.
@@ -197,23 +195,34 @@ Check these resources to browse a variety available wrappers, for DeFi, decentra
197195
Calling a function of a wrapper from the python client is as simple as creating a file in the `TODO (?polywrap-client)` directory, importing the Polywrap Python Client, calling the Uri where the WASM wrapper is hosted, and specifying any required arguments.
198196

199197
```python
200-
# get_eth_txns.py
198+
# hello_world.py
201199
from polywrap_client import PolywrapClient
202200
from polywrap_core import Uri, InvokerOptions
203201

204-
async def get_eth_transactions(accountAddress):
202+
async def update_contract_message(message: str):
203+
204+
# Instantiate the client
205205
client = PolywrapClient()
206-
#uri = Uri("wrap://ens/defiwrapper.polywrap.eth")
207-
uri = Uri(f'fs/{Path(__file__).parent.joinpath("cases", "wrap.wasm").absolute()}')
208-
args = {
209-
"accountAddress": "'0x123EtherumAddress12312'"
210-
}
211-
options = InvokerOptions(uri=uri, method="simpleMethod", args=args, encode_result=False)
206+
207+
# Load the WebAssembly wrapper through a URI that points to local file system
208+
uri = Uri(
209+
f'fs/{Path(__file__).parent.joinpath("cases", "simple-invoke", "wrap.wasm").absolute()}'
210+
)
211+
212+
args = {"arg": message }
213+
214+
# Configure the client
215+
options = InvokerOptions(
216+
uri=uri, method="simpleMethod", args=args, encode_result=False
217+
)
218+
219+
# Invoke the wrapper
212220
result = await client.invoke(options)
221+
213222
return result.result
214223

215224
if __name__ == "__main__":
216-
return get_eth_transactions(portfolio_address)
225+
return update_contract_message('hello polywrap!')
217226
```
218227

219228

@@ -227,8 +236,6 @@ Here's a good guide to learn about [building tests with Pytest](https://realpyth
227236

228237
The Polywrap project is completely open-source and we welcome contributors of all levels. Learn more about how you can contribute [here](https://github.com/polywrap/toolchain#contributing).
229238

230-
231-
232239
# Contact Us:
233240

234241
[Join our discord](https://discord.polywrap.io) and ask your questions right away!
@@ -239,4 +246,4 @@ The Polywrap project is completely open-source and we welcome contributors of al
239246
- [Polywrap Documentation](https://docs.polywrap.io)
240247
- [Polywrap Integrations Repository](https://github.com/polywrap/integrations)
241248
- [Running operations concurrently with python's asyncio](https://realpython.com/async-io-python/#the-10000-foot-view-of-async-io)
242-
- [Intro Video](TODO)
249+
- [Intro Video](TODO)

0 commit comments

Comments
 (0)