Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c211dde
feat(cbc): add CBC (Central Business Configuration) client module
soumyadey Sep 13, 2026
a88e841
feat(cbc): support PEM cert values via env vars and cert_path/key_pat…
soumyadey Sep 14, 2026
e240597
fix(cbc): address CI failures — ruff format, ty errors, telemetry cou…
soumyadey Sep 14, 2026
dfe418e
fix(cbc): clean up DefaultClient docstring and gitignore
soumyadey Sep 16, 2026
dd784da
refactor(cbc): remove local-mode auto-detection
soumyadey Sep 18, 2026
006aefd
fix(cbc): bump telemetry module count to 17 after upstream addition
soumyadey Sep 18, 2026
dff43ae
feat(cbc): move tenant_context to client level
soumyadey Sep 18, 2026
3902ada
refactor(cbc): two-layer client contract — thin core + platform adapter
soumyadey Oct 3, 2026
a684ad1
perf(cbc): resolve base_url once per get_configuration call
soumyadey Oct 3, 2026
ef6832d
fix(cbc): wrap destination errors as CBCConfigError in adapter
soumyadey Oct 3, 2026
a615ed2
feat(cbc): reload rotated mTLS certificate on TLS handshake failure
soumyadey Oct 4, 2026
520864f
test(cbc): fix ty type errors in rotation and adapter tests
soumyadey Oct 4, 2026
3c6688a
feat(cbc): add CBCDestinationConfig for the platform adapter
soumyadey Oct 4, 2026
3254907
refactor(cbc): rename EntityContent/EntityData → EntityData/ConfigEntity
soumyadey Oct 6, 2026
12ff0de
fix(cbc): align with confirmed API contract for entity data response
soumyadey Oct 6, 2026
cf446e4
chore(cbc): fix ty annotation after ConfigEntity rename; bump version…
soumyadey Oct 6, 2026
86a8c2c
feat(cbc): add get_entity_data for targeted single-entity fetch
soumyadey Oct 7, 2026
0546be7
test(cbc): fix GUIDELINES violations found in code review
soumyadey Oct 7, 2026
07e74c2
feat(cbc): adapt resolve_base_url to direct fragment lookup after PR #82
soumyadey Oct 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ env.bak/
venv.bak/
piperBuild-env/

# Local scratch
tmp/

# IDEs
.vscode/
.idea/
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "sap-cloud-sdk"
version = "0.58.1"
version = "0.59.0"
description = "SAP Cloud SDK for Python"
readme = "README.md"
license = "Apache-2.0"
Expand Down
108 changes: 108 additions & 0 deletions src/sap_cloud_sdk/cbc/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
"""SAP Cloud SDK for Python — CBC (Central Business Configuration) module.

Provides a typed Python client for reading tenant-specific business configuration
from SAP Central Business Configuration (CBC).

CBC is an SAP service that manages tenant-specific business configuration for
SAP cloud applications and AI agents.

Quick start::

from sap_cloud_sdk import cbc

cbc_client = cbc.create_client(
base_url=lambda: resolve_cbc_url(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't this be optional and based on SPII? Where user should get this url from?

app_tenant_id=lambda: resolve_app_tenant_id(),
ssl_context=lambda: build_ssl_ctx(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually just require the user_token on function level. We already have methods to facilitate the retrieve of it using runtime context module.

)
config = cbc_client.get_configuration()

# Access entity data
payment = config.get_config_object("payment-config")
if payment:
for row in payment.get_entity_data("payment-mode").as_list():
print(row)

Apps running on the SAP application platform can use
:func:`~sap_cloud_sdk.cbc.client_adapter.create_agent_client` instead, which supplies the
two resolvers and the mTLS context from the platform's provisioning conventions
— see the CBC user guide.
"""

from __future__ import annotations

from sap_cloud_sdk.cbc.client import (
CBCClient,
DefaultClient,
create_client,
)
from sap_cloud_sdk.cbc.client_adapter import (
CBC_FRAGMENT_PREFIX,
app_tenant_id_var,
create_agent_client,
load_ssl_context,
resolve_app_tenant_id,
resolve_base_url,
tenant_subdomain_var,
)
from sap_cloud_sdk.cbc.config import (
CBCDestinationConfig,
)
from sap_cloud_sdk.cbc.exceptions import (
CBCError,
CBCClientError,
CBCConfigError,
CBCHttpError,
CBCNetworkError,
CBCServerError,
HttpContext,
)
from sap_cloud_sdk.cbc._models import (
ApiError,
ConfigData,
ConfigEntity,
ConfigObject,
ConsumptionVersion,
ConsumptionVersions,
EntityData,
NNV,
)


__all__ = [
# factories
"create_client",
"create_agent_client",
# clients
"CBCClient",
"DefaultClient",
# platform adapter
"app_tenant_id_var",
"tenant_subdomain_var",
"CBC_FRAGMENT_PREFIX",
"CBCDestinationConfig",
# platform resolvers (compose with create_client to override one axis)
"resolve_base_url",
"resolve_app_tenant_id",
"load_ssl_context",
# exceptions
"CBCError",
"CBCClientError",
"CBCConfigError",
"CBCHttpError",
"CBCNetworkError",
"CBCServerError",
"HttpContext",
# models — consumption versions
"ConsumptionVersion",
"ConsumptionVersions",
"NNV",
# models — entities
"EntityData",
"ConfigEntity",
"ConfigObject",
# models — configuration
"ConfigData",
# models — api error
"ApiError",
]
Loading
Loading