No project description provided
Project description
polywrap-client-config-builder
A utility class for building the PolywrapClient config.
Supports building configs using method chaining or imperatively.
Quickstart
Initialize
Initialize a ClientConfigBuilder using the constructor
# start with a blank slate (typical usage)
builder = ClientConfigBuilder()
Configure
Add client configuration with add, or flexibly mix and match builder configuration methods to add and remove configuration items.
# add multiple items to the configuration using the catch-all `add` method
builder.add(
BuilderConfig(
envs={},
interfaces={},
redirects={},
wrappers={},
packages={},
resolvers=[]
)
)
// add or remove items by chaining method calls
builder
.add_package("wrap://plugin/package", test_plugin({}))
.remove_package("wrap://plugin/package")
.add_packages(
{
"wrap://plugin/http": http_plugin({}),
"wrap://plugin/filesystem": file_system_plugin({}),
}
)
Build
Finally, build a ClientConfig to pass to the PolywrapClient constructor.
# accepted by the PolywrapClient
config = builder.build()
# build with a custom cache
config = builder.build({
wrapperCache: WrapperCache(),
})
# or build with a custom resolver
coreClientConfig = builder.build({
resolver: RecursiveResolver(...),
})
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_client_config_builder-0.1.0a24.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5efe1ffb6e69fb714faa9c0ef2d612ad47c7d12525f7d8b2c67452613a6c1fcc |
|
MD5 | 6bc8b822556bb3399cf057f356603d60 |
|
BLAKE2b-256 | 2b7dfe3b4dc759fea0de63722dbe22076f94819e8c148926892de48594a507a0 |
Close
Hashes for polywrap_client_config_builder-0.1.0a24-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00f7acef6242ed31652a31ee59f1b8aef32ac293205f671caf5e91cc6a4a0697 |
|
MD5 | ea8a0c3e138a70461511b0eaae9a4adf |
|
BLAKE2b-256 | 12bd4277d8fc1cf12da56b9ba98af956919b4a55bdb3fb6bc2268574e6e7e94a |