Skip to content
Merged
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The SDK automatically resolves configuration from multiple sources with the foll

2. **Environment variables**: `CLOUD_SDK_CFG_<MODULE>_<INSTANCE>_<FIELD>`
- For instance names, hyphens (`"-"`) are replaced with underscores (`"_"`) for compatibility with system environment variables.
- You can see examples in our [env_integration_tests.example](.env_integration_tests.example)
- You can see examples in our [env_integration_tests.example](.env_integration_tests.example).

### Usage Guides

Expand Down
46 changes: 23 additions & 23 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "sap-cloud-sdk"
version = "0.49.1"
version = "0.49.2"
description = "SAP Cloud SDK for Python"
readme = "README.md"
license = "Apache-2.0"
Expand All @@ -9,23 +9,23 @@ authors = [
]
requires-python = ">=3.11"
dependencies = [
"minio~=7.2.16",
"setuptools>=83.0",
"requests>=2.33.0",
"requests-oauthlib~=2.0.0",
"minio>=7.2.16,<7.2.17",
"setuptools>=83.0,<84",
"requests>=2.33.0,<3",
"requests-oauthlib>=2.0.0,<3",
"pydantic~=2.12.3",
"hatchling~=1.27.0",
"opentelemetry-exporter-otlp-proto-grpc~=1.43.0",
"opentelemetry-exporter-otlp-proto-http~=1.43.0",
"traceloop-sdk~=0.61.0",
"opentelemetry-instrumentation-langchain>=0.61.0",
"httpx>=0.27.0",
"PyJWT>=2.13.0",
"protobuf>=5.29.5",
"protovalidate>=0.14.1",
"grpcio>=1.60.0",
"opentelemetry-api>=1.43.0",
"opentelemetry-sdk>=1.43.0",
"opentelemetry-instrumentation-langchain>=0.61.0,<1",
"httpx>=0.27.0,<1",
"PyJWT>=2.13.0,<3",
"protobuf>=6.0.0,<7",
"protovalidate>=0.14.1,<1",
"grpcio>=1.60.0,<2",
"opentelemetry-api>=1.43.0,<2",
"opentelemetry-sdk>=1.43.0,<2",
"opentelemetry-instrumentation-httpx~=0.64b0",
"opentelemetry-instrumentation-requests~=0.64b0",
"opentelemetry-instrumentation-grpc~=0.64b0",
Expand All @@ -36,19 +36,19 @@ dependencies = [
"opentelemetry-instrumentation-sqlalchemy~=0.64b0",
"opentelemetry-instrumentation-django~=0.64b0",
"opentelemetry-instrumentation-flask~=0.64b0",
"mcp>=1.1.0",
"cryptography>=46.0.3",
"mcp>=1.1.0,<2",
"cryptography>=46.0.3,<47",
]

[project.optional-dependencies]
extensibility = ["a2a-sdk>=0.2.0"]
starlette = ["starlette>=0.40.0"]
fastapi = ["fastapi>=0.100.0"]
aiohttp = ["aiohttp>=3.9.0"]
sqlalchemy = ["sqlalchemy>=2.0.0"]
django = ["django>=4.0"]
flask = ["flask>=3.0"]
langgraph = ["langgraph>=1.0.0"]
extensibility = ["a2a-sdk>=0.2.0,<2"]
starlette = ["starlette>=0.40.0,<1"]
fastapi = ["fastapi>=0.100.0,<1"]
aiohttp = ["aiohttp>=3.9.0,<4"]
sqlalchemy = ["sqlalchemy>=2.0.0,<3"]
django = ["django>=4.0,<5"]
flask = ["flask>=3.0,<4"]
langgraph = ["langgraph>=1.0.0,<2"]

[build-system]
requires = ["hatchling"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,18 @@ def _post_file_request(
"""Submit a multipart request with either a file path or in-memory bytes."""
file_handle: Optional[BinaryIO] = None
try:
file_data: BinaryIO | bytes
if request.file_path is not None:
file_handle = open(request.file_path, "rb")
file_value = file_handle
file_data = file_handle
else:
file_value = request.file_content
assert request.file_content is not None
file_data = request.file_content

files = {
"file": (
request.resolved_file_name(),
file_value,
file_data,
)
}

Expand Down
Loading
Loading