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.0a17.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e01e3f7a9121cde9f9482c932a1d7504f29e1459af7fbf441be00eff1ddcd414 |
|
MD5 | 9f658d02db5c568ee4127ef2d5b87f6e |
|
BLAKE2b-256 | e2d6a34b8230f00a4e04fe57e84940ad6a0a537043d82ad7a0ad428276748803 |
Close
Hashes for polywrap_client_config_builder-0.1.0a17-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cff1c09f9b32fb65634ea3adfdf1df82f2ad879b9872890dc8e54f4c2b077192 |
|
MD5 | b4b174e64874db0d16dc38bc0e35ed64 |
|
BLAKE2b-256 | 39145be5ce59027c5562f308fb5ef59f0f59e5a9d499656742505b395758539e |