GitHub

API reference for config.

Per-request changes to the TypeSafe client's HTTP client (Effect's TypeSafeConfig)::

program.pipe(config.with_client_transform(lambda client: client.retry_transient(times=2)))

A transform set here applies after the client's own transform_client.

Re-exports

Values

AttributeTypeDescription
Servicetype[ClientConfig]

Classes

Functions

get_or_none

get_or_none() -> Effect[Service | None]

The provided TypeSafeConfig, else None.

Returns Effect[Service | None]

def get_or_none() -> Effect[Service | None]:
    """The provided ``TypeSafeConfig``, else ``None``."""
    return P.client_config(TypeSafeConfig)

with_client_transform

with_client_transform(transform) -> P.WithClientTransform

Run an effect with its requests sent through transform(client). Use with .pipe.

ParameterTypeDescription
transformClientTransform

Returns P.WithClientTransform

def with_client_transform(transform: ClientTransform) -> P.WithClientTransform:
    """Run an effect with its requests sent through ``transform(client)``.
    Use with ``.pipe``."""
    return P.WithClientTransform(TypeSafeConfig, transform)