fastsdk 0.4.3__tar.gz → 0.4.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fastsdk-0.4.3 → fastsdk-0.4.4}/PKG-INFO +1 -1
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/request/api_client_socaity.py +18 -5
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk.egg-info/PKG-INFO +1 -1
- {fastsdk-0.4.3 → fastsdk-0.4.4}/pyproject.toml +1 -1
- {fastsdk-0.4.3 → fastsdk-0.4.4}/LICENSE +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/README.md +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/__init__.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/api.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/cli.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/fastClient.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/fastSDK.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/fastStub.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/requires.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/sdk_factory/__init__.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/sdk_factory/sdk_factory.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/sdk_factory/sdk_template.j2 +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_access.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/__init__.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/api_job_manager.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/api_seex.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/async_bridge.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/job_runtime.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/job_tasks.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/pipeline_planner.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/provider_factory.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/provider_stack_registry.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/request/__init__.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/request/api_client.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/request/api_client_replicate.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/request/api_client_runpod.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/request/file_handler.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/response/api_job_status.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/response/response_parser.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/response/response_schemas.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/response/sse_assembly.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_interaction/response/stream_session.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_specification_loader/replicate_loader.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_specification_loader/runpod_open_api_loader.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_specification_loader/spec_loader.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk.egg-info/SOURCES.txt +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk.egg-info/dependency_links.txt +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk.egg-info/entry_points.txt +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk.egg-info/requires.txt +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk.egg-info/top_level.txt +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/setup.cfg +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/test/test_apipod_debug_test_services.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/test/test_apipod_registry_service_management_example.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/test/test_client_factory.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/test/test_client_factory_manual.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/test/test_client_from_fastapi.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/test/test_client_from_runpod_serverless.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/test/test_httpx_api.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/test/test_localhost_services.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/test/test_manual_sdk.py +0 -0
- {fastsdk-0.4.3 → fastsdk-0.4.4}/test/test_replicate.py +0 -0
|
@@ -71,14 +71,27 @@ class APIClientSocaity(APIClient):
|
|
|
71
71
|
|
|
72
72
|
endpoint = self._endpoint_for_url(request_data.url)
|
|
73
73
|
content_type = getattr(endpoint, "request_body_content_type", None) if endpoint else None
|
|
74
|
+
# Registered chat/LLM schemas must stay JSON even when a legacy contract
|
|
75
|
+
# advertised form/urlencoded (flattened messages would be stringified).
|
|
76
|
+
standard_schema = getattr(endpoint, "standard_schema", None) if endpoint else None
|
|
77
|
+
body = {k: v for k, v in request_data.body_params.items() if v is not None}
|
|
78
|
+
has_nested = any(isinstance(v, (dict, list)) for v in body.values())
|
|
79
|
+
use_json = (
|
|
80
|
+
content_type == "application/json"
|
|
81
|
+
or (isinstance(standard_schema, str) and standard_schema.endswith("Request"))
|
|
82
|
+
or (
|
|
83
|
+
# Nested objects/arrays cannot round-trip through urlencoded forms
|
|
84
|
+
# without being JSON-stringified; prefer a real JSON body instead.
|
|
85
|
+
has_nested
|
|
86
|
+
and content_type != "multipart/form-data"
|
|
87
|
+
)
|
|
88
|
+
)
|
|
74
89
|
|
|
75
|
-
if
|
|
76
|
-
kwargs["json"] =
|
|
90
|
+
if use_json:
|
|
91
|
+
kwargs["json"] = body
|
|
77
92
|
else:
|
|
78
93
|
form_data = {}
|
|
79
|
-
for key, value in
|
|
80
|
-
if value is None:
|
|
81
|
-
continue
|
|
94
|
+
for key, value in body.items():
|
|
82
95
|
if isinstance(value, (dict, list)):
|
|
83
96
|
form_data[key] = json.dumps(value)
|
|
84
97
|
else:
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "fastsdk"
|
|
7
|
-
version = "0.4.
|
|
7
|
+
version = "0.4.4"
|
|
8
8
|
description = "Turn any AI/web service (OpenAPI, Replicate, RunPod, APIPod) into a native-feeling Python client."
|
|
9
9
|
requires-python = ">=3.8"
|
|
10
10
|
authors = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fastsdk-0.4.3 → fastsdk-0.4.4}/fastsdk/service_specification_loader/runpod_open_api_loader.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|