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.0b3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5f028c368b256da11a67956b7ef8778dce553588df5634abe51e459f9f7197f |
|
MD5 | baaadb0e09e05f3c0faf6cbeb5b0dddb |
|
BLAKE2b-256 | 93eaf9aa316320838c60e3b47e13473e79ef142538486a7c1b877c0e2d2773f7 |
Close
Hashes for polywrap_fs_plugin-0.1.0b3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8ef6960b2b0188a1eac3aaf34a9e96b5e7ba567214dbc86fbbd7dea9799080b |
|
MD5 | a231042f90abd7c870d52f544c3780d1 |
|
BLAKE2b-256 | 6398be2790b13b3d48fab38f7fe11233f639384f73bb45a15da85245f6bba9fa |