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.0a33.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2d4689d779178297674cafe43964a3461dd2968458b2390aa2fb17ec0040e13 |
|
MD5 | a2e64e7a196cda029c7004ed189b5a98 |
|
BLAKE2b-256 | 76bdc4544e360f7d4c2ef1d4bb00a4be7b23dfb263288c5a1668eab0cec481df |
Close
Hashes for polywrap_client_config_builder-0.1.0a33-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e1f28fa2ed530c8bde86588cb419587eb208c7439728823a311d67bb585a997 |
|
MD5 | 29bad604554c7f7d8c1e0a6f91f3b6af |
|
BLAKE2b-256 | 2ef7bcd53ae4c5fb21860a1148640aeaf6bfbb56afc7b7fbe41e1560bae32dc4 |