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.0a3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24c41fc0ff39688ec0aad3bdbe721d0ac305ce3ea267cc884d27289883865350 |
|
MD5 | d27abfdb7fa516bb7e5bb98956c3c92d |
|
BLAKE2b-256 | efcf998a8ee6fa448641fbbf860f00ae1f6636d00354ca37903381f8ea607f64 |
Close
Hashes for polywrap_fs_plugin-0.1.0a3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56e3a3079dcd08919b146b115c1d175c0a22a5cf25f46e741da0792d688b7fa0 |
|
MD5 | bd135f0944721f3b901570d5cdaf7a06 |
|
BLAKE2b-256 | 179d420819a3277648f0c111ef0a4403e55cbefe4b2dc6f61ccf02def33e124f |