Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions .env_integration_tests.example
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ CLOUD_SDK_CFG_OBJECTSTORE_DEFAULT_ACCESS_KEY_ID=your-access-key-id-here
CLOUD_SDK_CFG_OBJECTSTORE_DEFAULT_SECRET_ACCESS_KEY=your-secret-access-key-here
CLOUD_SDK_CFG_OBJECTSTORE_DEFAULT_BUCKET=your-bucket-name-here

# Azure and GCS use separate instances so all providers can run together.
CLOUD_SDK_CFG_OBJECTSTORE_AZURE_CONTAINER_NAME=your-container-name-here
CLOUD_SDK_CFG_OBJECTSTORE_AZURE_CONTAINER_URI=your-container-uri-here
CLOUD_SDK_CFG_OBJECTSTORE_AZURE_SAS_TOKEN=your-sas-token-here

CLOUD_SDK_CFG_OBJECTSTORE_GCS_BASE64ENCODEDPRIVATEKEYDATA=your-base64-service-account-json-here
CLOUD_SDK_CFG_OBJECTSTORE_GCS_PROJECTID=your-gcp-project-id-here
CLOUD_SDK_CFG_OBJECTSTORE_GCS_BUCKET=your-bucket-here

# OUTPUT MANAGEMENT
# For cloud mode (destination-based):
CLOUD_SDK_OMS_DESTINATION_NAME=your-output-management-destination-name-here
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ Each module has comprehensive usage guides:
- [DMS](src/sap_cloud_sdk/dms/user-guide.md)
- [Extensibility](src/sap_cloud_sdk/extensibility/user-guide.md)
- [IAS](src/sap_cloud_sdk/ias/user-guide.md)
- [ObjectStore](src/sap_cloud_sdk/objectstore/user-guide.md)
- [Object Storage](src/sap_cloud_sdk/object_storage/user-guide.md)
- [ObjectStore (deprecated)](src/sap_cloud_sdk/objectstore/user-guide.md)
- [Secret Resolver](src/sap_cloud_sdk/core/secret_resolver/user-guide.md)
- [Telemetry](src/sap_cloud_sdk/core/telemetry/user-guide.md)
- [Print](src/sap_cloud_sdk/print/user-guide.md)
Expand Down
20 changes: 16 additions & 4 deletions docs/INTEGRATION_TESTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,26 @@ Tests are skipped automatically when `CLOUD_SDK_CFG_DPI_NG_DEFAULT_BASE_URL` or

### ObjectStore Integration Tests

For ObjectStore integration tests, configure the following variables in `.env_integration_tests`:
For ObjectStore integration tests, configure the variables for the provider(s)
under test in `.env_integration_tests`. Each provider lives under its own
instance name so a single run can exercise all three at once. Providers without credentials are skipped.

```bash
# ObjectStore Configuration
# ObjectStore S3 Configuration
CLOUD_SDK_CFG_OBJECTSTORE_DEFAULT_HOST=your-host-here
CLOUD_SDK_CFG_OBJECTSTORE_DEFAULT_ACCESS_KEY_ID=your-access-key-id-here
CLOUD_SDK_CFG_OBJECTSTORE_DEFAULT_SECRET_ACCESS_KEY=your-secret-access-key-kere
CLOUD_SDK_CFG_OBJECTSTORE_DEFAULT_SECRET_ACCESS_KEY=your-secret-access-key-here
CLOUD_SDK_CFG_OBJECTSTORE_DEFAULT_BUCKET=your-bucket-here
CLOUD_SDK_CFG_OBJECTSTORE_DEFAULT_SSL_ENABLED=false

# ObjectStore Azure Blob Storage Configuration
CLOUD_SDK_CFG_OBJECTSTORE_AZURE_CONTAINER_NAME=your-container-name-here
CLOUD_SDK_CFG_OBJECTSTORE_AZURE_CONTAINER_URI=your-container-uri-here
CLOUD_SDK_CFG_OBJECTSTORE_AZURE_SAS_TOKEN=your-sas-token-here

# ObjectStore GCS Configuration
CLOUD_SDK_CFG_OBJECTSTORE_GCS_BASE64ENCODEDPRIVATEKEYDATA=your-base64-service-account-json-here
CLOUD_SDK_CFG_OBJECTSTORE_GCS_PROJECTID=your-gcp-project-id-here
CLOUD_SDK_CFG_OBJECTSTORE_GCS_BUCKET=your-bucket-here
```

## Running Integration Tests
Expand All @@ -209,6 +220,7 @@ uv run pytest tests/destination/integration/ -v
uv run pytest tests/dms/integration/ -v
uv run pytest tests/dpi_ng/integration/consent/ -v
uv run pytest tests/objectstore/integration/ -v
uv run pytest tests/object_storage/integration/ -v
```

### BDD Scenarios
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ authors = [
requires-python = ">=3.11"
dependencies = [
"minio>=7.2.16,<7.2.17",
"azure-storage-blob>=12.20.0,<13",
"google-cloud-storage>=2.18.0,<4",
"setuptools>=83.0,<84",
"requests>=2.33.0,<3",
"requests-oauthlib>=2.0.0,<3",
Expand Down
49 changes: 49 additions & 0 deletions src/sap_cloud_sdk/object_storage/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"""SAP Cloud SDK for Python - Object Store module

``create_client()`` auto-detects the cloud provider from the service binding and
returns a client implementing the ``ObjectStoreClient`` protocol. Supported
providers: S3/MinIO, Azure Blob Storage, Google Cloud Storage.

Usage:
from sap_cloud_sdk.object_storage import create_client

client = create_client(instance="object-store-1")
"""

from sap_cloud_sdk.object_storage._factory import create_client
from sap_cloud_sdk.object_storage._models import ObjectMetadata
from sap_cloud_sdk.object_storage._protocol import ObjectReader, ObjectStoreClient
from sap_cloud_sdk.object_storage.config import (
AzureConfig,
GcsConfig,
S3Config,
)
from sap_cloud_sdk.object_storage.exceptions import (
ClientCreationError,
ConfigError,
ListObjectsError,
ObjectNotFoundError,
ObjectOperationError,
ObjectStoreError,
)

__all__ = [
# Protocol (usable as a type annotation)
"ObjectStoreClient",
"ObjectReader",
# Config types (pass to create_client() to bypass auto-detection)
"S3Config",
"AzureConfig",
"GcsConfig",
# Metadata model
"ObjectMetadata",
# Factory function
"create_client",
# Exceptions
"ObjectStoreError",
"ConfigError",
"ClientCreationError",
"ObjectOperationError",
"ObjectNotFoundError",
"ListObjectsError",
]
Loading
Loading