---
editLink: false
lastUpdated: false
outline: [2, 3]
---

<!-- Generated by python/b2c-tooling-sdk/scripts/generate_api_docs.py. Do not edit. -->

# b2c_tooling_sdk.sync

Blocking (synchronous) facade over the async `b2c_tooling_sdk` public API.

Every public callable in the top-level `b2c_tooling_sdk.__all__` (plus the four
SLAS shopper functions) has a synchronous twin here with an *identical* signature
minus `await`:

```python
from b2c_tooling_sdk.sync import get_guest_token, resolve_config, create_metrics_client

cfg = resolve_config()                 # blocks
tok = get_guest_token(slas_config)     # blocks
client = create_metrics_client(...)    # returns a blocking proxy
```
All calls run on a single persistent background event loop (see `_runner`), so
the async SDK's token caching / single-flight semantics are preserved exactly.

This subpackage is intentionally NOT re-exported from the top-level
`b2c_tooling_sdk` package; import it directly as `b2c_tooling_sdk.sync`.

**Classification of the mirrored symbols**
Each public symbol is re-exported according to what calling it produces:

* **Coroutine functions** (`resolve_config`, the metrics `get_*` functions,
  the `operations` verbs, SLAS `get_guest_token` / `get_registered_token`,
  ...) → wrapped with `_wrap_callable` (run on the loop, result syncified).
* **Synchronous factory functions** that return objects with coroutine methods
  (`create_*_client`, `create_*_backend`, `create_config_resolver`,
  `create_instance_from_config`, `resolve_auth_strategy`) → wrapped with
  `_wrap_sync_factory` (not run on the loop, but the returned object is
  syncified so its methods block). See `_SYNC_FACTORIES`.
* **Everything else** — already-synchronous helpers (`to_organization_id`,
  `decode_jwt`, PKCE `generate_code_*`, `parse_metrics_bound`, ...), the
  middleware factories (`create_auth_middleware` /
  `create_extra_params_middleware` — their middleware objects must stay async
  for httpx), and all types, dataclasses, exceptions, enums, protocols and
  constants → re-exported AS-IS (the *same* objects as the async package, so
  `isinstance` and error handling work across both surfaces).

Streaming / async-generator APIs (e.g. log tailing, cartridge watching) are not
part of the top-level barrel and are therefore out of scope for this facade.
`watch_cartridges` is a coroutine (not an async generator) and is wrapped.
