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.0a19.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b30aca0a2c155fa60ace788c52d0d7069ac327d2cf3b8af25afe2fadcc4dcbf4 |
|
MD5 | 3f92ab1e4a17e49fa3ebaf5c65d03d97 |
|
BLAKE2b-256 | acde26a6ae35266c791ec64d8a8052d422e26f29704ce620b70a3b4ed1b22557 |
Close
Hashes for polywrap_client_config_builder-0.1.0a19-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35eb0da4e993297eb65c77dd01edbc1418993f102eb7d581556db80d11087b73 |
|
MD5 | 280494edbe0d0400fb2b08822f9ae60b |
|
BLAKE2b-256 | da17056903964903622a35dd3e654dc954fc7def0e4c03021cdea7e5a430f47b |