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.0a25.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 957bfa0fcb79c4aec131f7987944e72c464de8ae36bc52ab5caf2205126a66ed |
|
MD5 | f99851fa0cc650ef1116e208e24c37b9 |
|
BLAKE2b-256 | 2476eb37750640ecf061892edd16877b3209267407e4be94e9717801eaca1fc0 |
Close
Hashes for polywrap_client_config_builder-0.1.0a25-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4207d5ffebfc48636d6108cb784c984c37201791c86769592ba9dd2758592f0b |
|
MD5 | c2e8bce722490fa486a39cbb347eb9dc |
|
BLAKE2b-256 | 74e8b1ec91e7cfd1e3cc50b9a46dc78dfdf4ff4cd2a1b64104b3884c53328eb9 |