Skip to main content

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


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.0a26.tar.gz.

File metadata

File hashes

Hashes for polywrap_client_config_builder-0.1.0a26.tar.gz
Algorithm Hash digest
SHA256 768d3fbdfc2236f23f892dbb4ca94466f8d4a7338c6f95f8b81b64ca7afe2d5d
MD5 6c15a3c7c8beafd48c0a6e440ebfca60
BLAKE2b-256 9c28eccd173fcaeea3e1a2c2a28c452d3771f154127da92c2a4821eaa4e1f6e1

See more details on using hashes here.

Provenance

File details

Details for the file polywrap_client_config_builder-0.1.0a26-py3-none-any.whl.

File metadata

File hashes

Hashes for polywrap_client_config_builder-0.1.0a26-py3-none-any.whl
Algorithm Hash digest
SHA256 9cadb157e6ce5f31ef79206f51a97d1c56d36bfa3725251007064193e9ea92d7
MD5 f7e4ebe7cd360991f938bea30c06794a
BLAKE2b-256 f3c72e860f0c14e8fea9841f7e609f3470d6748ced2168efe49ca22b341b71b7

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page