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.0a35.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 607c4d76435a5f8d5e21648e14d1329d008c02cf4c2ea0e982e9322faf144fd5 |
|
MD5 | 4fe0f2355c9e3385dd29c7b087098e4b |
|
BLAKE2b-256 | 4e9f37858e1349a5846f96e325aed573ea548b030affe0d02d02e701df5d9207 |
Close
Hashes for polywrap_client_config_builder-0.1.0a35-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c443dbc55d20733476470e4c708c569cd5b8666e517024b4dc0a34e0903660e8 |
|
MD5 | 68d6bc1ffdfe8fd1adbcfe25ac6d0433 |
|
BLAKE2b-256 | c0da264b615894d87eb1f60e5f3194bcb4898d72f0141e22893855829ba24aea |