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({
resolution_result_cache: ResolutionResultCache(),
})
# or build with a custom resolver
config = 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.0a31.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48188a1eaa9cc2143b591812a67063ad00b26d4641f65803d5dfc3d6973f3a36 |
|
MD5 | 4378cc0fcdbc3b50c0d75e681ddd1b63 |
|
BLAKE2b-256 | c78a9c1f5d4dac0e7c6934fd2d20a2104c2825e7e5eb91b27c7536b8c8d9bfb2 |
Close
Hashes for polywrap_client_config_builder-0.1.0a31-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b57112b9518589509eab7760e10edfbcf5a33116ac3e4264fbbaa3008aa09fb |
|
MD5 | c687aa915b071ae016941a061767a0b9 |
|
BLAKE2b-256 | 7dc4615964b1f3245b0188ca8f5b1caa82840d3500bcd06de6e4a0e329b31c07 |