No project description provided
Project description
polywrap-fs-plugin
The Filesystem plugin enables wraps running within the Polywrap client to interact with the local filesystem.
Interface
The FileSystem plugin implements an existing wrap interface at wrap://ens/wraps.eth:file-system@1.0.0
.
Usage
from polywrap_client import PolywrapClient
from polywrap_client_config_builder import PolywrapClientConfigBuilder
from polywrap_fs_plugin import file_system_plugin
fs_interface_uri = Uri.from_str("wrap://ens/wraps.eth:file-system@1.0.0")
fs_plugin_uri = Uri.from_str("plugin/file-system")
config = (
PolywrapClientConfigBuilder()
.set_package(fs_plugin_uri, file_system_plugin())
.add_interface_implementations(fs_interface_uri, [fs_plugin_uri])
.set_redirect(fs_interface_uri, fs_plugin_uri)
.build()
)
client.invoke(
uri=Uri.from_str("wrap://ens/wraps.eth:file-system@1.0.0"),
method="readFile",
args={
"path": "./file.txt"
}
);
For more usage examples see src/__tests__
.
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_fs_plugin-0.1.0b2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64e7a001ab849e5142c4492fb9ffb90ab484bb7c9419efd51f3835a2b8cf75f4 |
|
MD5 | d5966a7090ff0b97dd80db8b58ad2e9d |
|
BLAKE2b-256 | 49c3b384f698e2c45b5aefd608415de97443ae448c493aa2f13c14035288d886 |
Close
Hashes for polywrap_fs_plugin-0.1.0b2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81179cbd16f4c0ca3f25035c7abef9048c3beda725b7b05019dc4e23f8e5c4a0 |
|
MD5 | 39a541051628aec31ffdd048916434ae |
|
BLAKE2b-256 | 13d61cf2aace7b5e06b7122b168f01cbee5501639e15c366dac6d411d1968f42 |