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.0a30.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0f22cb9e0f631490babc377f338d1e21fb2d5a97c48a3d666262c053ec88196 |
|
MD5 | 1a76f28c873ff7b839aee880eb164a96 |
|
BLAKE2b-256 | 000175423a18aacceb2fd7099527165a512866f114727ad13435408243266b2f |
Close
Hashes for polywrap_client_config_builder-0.1.0a30-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 910619d14d09911136543a3c1832f57ad2931df0eac84841e0d2abc4b3c07b88 |
|
MD5 | 2c61ba3e8c6926f4c59d66bc48eaaf62 |
|
BLAKE2b-256 | 1a118989f854cdeb534813738d6d064c3bf7b8430d484c0f925a6b7aa0d7f0a2 |