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
File details
Details for the file polywrap_client_config_builder-0.1.0a20.tar.gz
.
File metadata
- Download URL: polywrap_client_config_builder-0.1.0a20.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.11 Linux/5.15.0-1035-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86b1e7105aae77f0c650e72e4e4a9d588a908d36d2c2193443414814e4b09ceb |
|
MD5 | 8b1059e9a6528a000f312c8783bb853c |
|
BLAKE2b-256 | 8bbdcca5e2adae6e1bceed99c68fed9f93c1da7084bac34f56d87ef8045e06f0 |
Provenance
File details
Details for the file polywrap_client_config_builder-0.1.0a20-py3-none-any.whl
.
File metadata
- Download URL: polywrap_client_config_builder-0.1.0a20-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.11 Linux/5.15.0-1035-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4306d303fe6cb9ca60578d2f55e408b039b77ef31a83d409ec84291f4c6dec2c |
|
MD5 | 715e6747236d283186d0ab16f3eaaba9 |
|
BLAKE2b-256 | 8da1ecf3a4987da2431081b899b71d5b8f5fdc8d628bc23f78d4440dfcc1acf9 |