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.0a23.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 100b1c60f1bdf712c4d1f5baba15d807fd74688d8ff14d6ca5c56a0e8b856286 |
|
MD5 | 36541f50743d86689d2e2c007c6d2104 |
|
BLAKE2b-256 | 1895ec0c4671b4d2bed32aa3592e6a5dfcb35237f014bdb7b0272e5256fd0209 |
Close
Hashes for polywrap_client_config_builder-0.1.0a23-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21413047adf1cd1da79470c6137f841e047e5d2c8a7f8a76a320281ef930ed2c |
|
MD5 | c8c8d25966adb010898bf4027000604f |
|
BLAKE2b-256 | e58f3fb69489104915b9f8c6216fb1ccd6002fb0c37454e9737ee48bfc3dd954 |