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.0a4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 453456e6b5329b43dfdd4ee1c39970217e324ef2519d22393db2a85f343f399b |
|
MD5 | 15b6b0171e54e9ae0990c43dea3ead41 |
|
BLAKE2b-256 | d74bfa4f34b449b792477461292b78f953fbfdbe075afca7d704abc73266a1fc |
Close
Hashes for polywrap_fs_plugin-0.1.0a4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f7e19a659ea0556c3e5a00fe1b9ed6719f8ba19fd49e99b81193a36b30c899a |
|
MD5 | 66ae5c0aaccd1c648e1a994d186caf26 |
|
BLAKE2b-256 | 4f0ab90046458a03d3dee04a23ab0a56c72e4f87e896ecba185bf5102db4df71 |