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.0a29.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5c04c64dbc20cbd587cccffd5a2a557d4214126d8587d033c2f30948f67375a |
|
MD5 | 42f82ea18f9b32682fe660d24891c85d |
|
BLAKE2b-256 | 7f48c21e7b5d9ec617aefa3f3d4befd35d2c3e666fcb10d24896894635dae354 |
Close
Hashes for polywrap_client_config_builder-0.1.0a29-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4238ebd9f459c68afa860453d08725e31fd217bc52e25ef9562878bf77f51190 |
|
MD5 | f6d1a7c879ca15430d66fa3eb39c14bd |
|
BLAKE2b-256 | 35b7a06c369af13931cf3682a79dfd54f62f0276f5edcf3382a52927e9fd8c30 |