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.0a2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1293e810d7843d60f1aea947d56912956db211a39ae9d4d3954ec8465684b39 |
|
MD5 | 52418fa1ec325ce48439fef2c240f592 |
|
BLAKE2b-256 | 3e327608dbc8d8172eb598f6934b8a2570e439eaaa616cf8bc1a06cbbcdf9669 |
Close
Hashes for polywrap_fs_plugin-0.1.0a2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 022c56407d4f9e42d2c41d114dfb6d05ae06e4e1cd8a88043807ff087d0b8b98 |
|
MD5 | 8c93f17fd2fb84248939c97f39dc8630 |
|
BLAKE2b-256 | 06a86beeef098e423483bca20e6d4b3770ef67097799c4da6a4a40b4fc08abde |