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.0a15.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c88bc44dc1d174eb9b00d3c582630ac63ca3b27597c83558f68ce694827d8b3 |
|
MD5 | cbf53fe25614f27e2835d821b83320f0 |
|
BLAKE2b-256 | 267204adf3b9047fd15ba29ac57c2372884c2f3a759cec270e1b811d3b1e311c |
Close
Hashes for polywrap_client_config_builder-0.1.0a15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a25078f510c3e45bc5bd911955968e9c5e09eb0805dfb2ceb5d712d55d260f7f |
|
MD5 | 84e632d14ef03e72ff3e015048d793b4 |
|
BLAKE2b-256 | b8344259ec288624653dfc2291a422482f95f6060ed34091f28ef56ba35b6b7d |