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.0a22.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80dbf7719d13e2d122cee7cbe3f29f98ea0a889f2f29c421a02aa26972a2e667 |
|
MD5 | 2b8e10a7cbc206b7290d5da32231b0b1 |
|
BLAKE2b-256 | e67e06d55f81ed0281c1e210532ec624236c5b51d86033dedd8f799663f856f2 |
Close
Hashes for polywrap_client_config_builder-0.1.0a22-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b16a6ff8f0db1e25c15d78ba85858fa8d8b4762f88fd1c845159bfdb11f76679 |
|
MD5 | 121f6edf1e9f2b30dbafedb96dd5260d |
|
BLAKE2b-256 | 9be1d410c76e925fe4189d6cd28c857c5d5b162b2ff54135885b9d17218ab99f |