langflow-control-plane-sdk 0.0.0.dev2__tar.gz → 0.1.1__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.
Potentially problematic release.
This version of langflow-control-plane-sdk might be problematic. Click here for more details.
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/PKG-INFO +26 -7
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/README.md +25 -6
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/__init__.py +1 -1
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/api/deployments_api.py +7 -7
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/api_client.py +1 -1
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/configuration.py +8 -28
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/create_deployment.py +1 -1
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/deployment_detail.py +1 -1
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/deployment_list_item.py +1 -1
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/error_code.py +3 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/pyproject.toml +1 -1
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/LICENSE +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/api/__init__.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/api_response.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/exceptions.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/__init__.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/backend_type.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/column_config.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/deployment_list.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/error_body.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/error_envelope.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/flow.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/flow_payload.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/flow_payload_data.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/flow_ref.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/knowledge_base_item.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/memory_base_item.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/patch_deployment.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/replace_deployment.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/sync_item_result.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/sync_report.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/sync_request.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/models/sync_summary.py +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/py.typed +0 -0
- {langflow_control_plane_sdk-0.0.0.dev2 → langflow_control_plane_sdk-0.1.1}/langflow_control_plane_sdk/rest.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: langflow-control-plane-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Generated async Python client for the Langflow Control Plane API
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -36,21 +36,40 @@ release-candidate builds, or install an exact version such as
|
|
|
36
36
|
|
|
37
37
|
## Configure
|
|
38
38
|
|
|
39
|
-
Set the Control Plane base URL and
|
|
40
|
-
|
|
39
|
+
Set the Control Plane base URL and the bearer token the authoring plane minted
|
|
40
|
+
for the caller:
|
|
41
41
|
|
|
42
42
|
```python
|
|
43
43
|
import langflow_control_plane_sdk as control_plane
|
|
44
44
|
|
|
45
45
|
configuration = control_plane.Configuration(
|
|
46
46
|
host="https://control-plane.example",
|
|
47
|
-
|
|
47
|
+
access_token="replace-me",
|
|
48
48
|
)
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
The
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
The token is sent as `Authorization: Bearer ...`; do not log it. The Control
|
|
52
|
+
Plane verifies it against the one JWKS issuer it trusts, and calls Langflow with
|
|
53
|
+
its own service credential rather than forwarding anything the client supplied.
|
|
54
|
+
An authentication change affects SDK users and is treated as semver-significant.
|
|
55
|
+
|
|
56
|
+
### Pass-through planes
|
|
57
|
+
|
|
58
|
+
A Control Plane started with `LANGFLOW_CONTROL_PLANE_AUTH_MODE=passthrough` — the
|
|
59
|
+
local development mode — does not verify a bearer token at all. It requires a
|
|
60
|
+
Langflow API key in `x-api-key` and forwards that key to Langflow unchanged. The
|
|
61
|
+
contract declares only the bearer scheme, so the generated `Configuration` has no
|
|
62
|
+
field for it; set it as a default header on the client:
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
client = control_plane.ApiClient(configuration)
|
|
66
|
+
client.default_headers["x-api-key"] = "your-langflow-api-key"
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Without that header a pass-through plane answers `401 UNAUTHENTICATED` no matter
|
|
70
|
+
what `access_token` is set to, which is otherwise an unexplained rejection. Do
|
|
71
|
+
not send the key to a plane running in `idp` mode: there it is ignored, and the
|
|
72
|
+
bearer token is the only credential read.
|
|
54
73
|
|
|
55
74
|
## Async CRUD
|
|
56
75
|
|
|
@@ -18,21 +18,40 @@ release-candidate builds, or install an exact version such as
|
|
|
18
18
|
|
|
19
19
|
## Configure
|
|
20
20
|
|
|
21
|
-
Set the Control Plane base URL and
|
|
22
|
-
|
|
21
|
+
Set the Control Plane base URL and the bearer token the authoring plane minted
|
|
22
|
+
for the caller:
|
|
23
23
|
|
|
24
24
|
```python
|
|
25
25
|
import langflow_control_plane_sdk as control_plane
|
|
26
26
|
|
|
27
27
|
configuration = control_plane.Configuration(
|
|
28
28
|
host="https://control-plane.example",
|
|
29
|
-
|
|
29
|
+
access_token="replace-me",
|
|
30
30
|
)
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
The
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
The token is sent as `Authorization: Bearer ...`; do not log it. The Control
|
|
34
|
+
Plane verifies it against the one JWKS issuer it trusts, and calls Langflow with
|
|
35
|
+
its own service credential rather than forwarding anything the client supplied.
|
|
36
|
+
An authentication change affects SDK users and is treated as semver-significant.
|
|
37
|
+
|
|
38
|
+
### Pass-through planes
|
|
39
|
+
|
|
40
|
+
A Control Plane started with `LANGFLOW_CONTROL_PLANE_AUTH_MODE=passthrough` — the
|
|
41
|
+
local development mode — does not verify a bearer token at all. It requires a
|
|
42
|
+
Langflow API key in `x-api-key` and forwards that key to Langflow unchanged. The
|
|
43
|
+
contract declares only the bearer scheme, so the generated `Configuration` has no
|
|
44
|
+
field for it; set it as a default header on the client:
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
client = control_plane.ApiClient(configuration)
|
|
48
|
+
client.default_headers["x-api-key"] = "your-langflow-api-key"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Without that header a pass-through plane answers `401 UNAUTHENTICATED` no matter
|
|
52
|
+
what `access_token` is set to, which is otherwise an unexplained rejection. Do
|
|
53
|
+
not send the key to a plane running in `idp` mode: there it is ignored, and the
|
|
54
|
+
bearer token is the only credential read.
|
|
36
55
|
|
|
37
56
|
## Async CRUD
|
|
38
57
|
|
|
@@ -325,7 +325,7 @@ class DeploymentsApi:
|
|
|
325
325
|
|
|
326
326
|
# authentication setting
|
|
327
327
|
_auth_settings: List[str] = [
|
|
328
|
-
'
|
|
328
|
+
'ControlPlaneToken'
|
|
329
329
|
]
|
|
330
330
|
|
|
331
331
|
return self.api_client.param_serialize(
|
|
@@ -604,7 +604,7 @@ class DeploymentsApi:
|
|
|
604
604
|
|
|
605
605
|
# authentication setting
|
|
606
606
|
_auth_settings: List[str] = [
|
|
607
|
-
'
|
|
607
|
+
'ControlPlaneToken'
|
|
608
608
|
]
|
|
609
609
|
|
|
610
610
|
return self.api_client.param_serialize(
|
|
@@ -902,7 +902,7 @@ class DeploymentsApi:
|
|
|
902
902
|
|
|
903
903
|
# authentication setting
|
|
904
904
|
_auth_settings: List[str] = [
|
|
905
|
-
'
|
|
905
|
+
'ControlPlaneToken'
|
|
906
906
|
]
|
|
907
907
|
|
|
908
908
|
return self.api_client.param_serialize(
|
|
@@ -1178,7 +1178,7 @@ class DeploymentsApi:
|
|
|
1178
1178
|
|
|
1179
1179
|
# authentication setting
|
|
1180
1180
|
_auth_settings: List[str] = [
|
|
1181
|
-
'
|
|
1181
|
+
'ControlPlaneToken'
|
|
1182
1182
|
]
|
|
1183
1183
|
|
|
1184
1184
|
return self.api_client.param_serialize(
|
|
@@ -1490,7 +1490,7 @@ class DeploymentsApi:
|
|
|
1490
1490
|
|
|
1491
1491
|
# authentication setting
|
|
1492
1492
|
_auth_settings: List[str] = [
|
|
1493
|
-
'
|
|
1493
|
+
'ControlPlaneToken'
|
|
1494
1494
|
]
|
|
1495
1495
|
|
|
1496
1496
|
return self.api_client.param_serialize(
|
|
@@ -1806,7 +1806,7 @@ class DeploymentsApi:
|
|
|
1806
1806
|
|
|
1807
1807
|
# authentication setting
|
|
1808
1808
|
_auth_settings: List[str] = [
|
|
1809
|
-
'
|
|
1809
|
+
'ControlPlaneToken'
|
|
1810
1810
|
]
|
|
1811
1811
|
|
|
1812
1812
|
return self.api_client.param_serialize(
|
|
@@ -2125,7 +2125,7 @@ class DeploymentsApi:
|
|
|
2125
2125
|
|
|
2126
2126
|
# authentication setting
|
|
2127
2127
|
_auth_settings: List[str] = [
|
|
2128
|
-
'
|
|
2128
|
+
'ControlPlaneToken'
|
|
2129
2129
|
]
|
|
2130
2130
|
|
|
2131
2131
|
return self.api_client.param_serialize(
|
|
@@ -91,7 +91,7 @@ class ApiClient:
|
|
|
91
91
|
self.default_headers[header_name] = header_value
|
|
92
92
|
self.cookie = cookie
|
|
93
93
|
# Set default User-Agent.
|
|
94
|
-
self.user_agent = 'OpenAPI-Generator/0.
|
|
94
|
+
self.user_agent = 'OpenAPI-Generator/0.1.1/python'
|
|
95
95
|
self.client_side_validation = configuration.client_side_validation
|
|
96
96
|
|
|
97
97
|
async def __aenter__(self):
|
|
@@ -110,7 +110,7 @@ HTTPSignatureAuthSetting = TypedDict(
|
|
|
110
110
|
AuthSettings = TypedDict(
|
|
111
111
|
"AuthSettings",
|
|
112
112
|
{
|
|
113
|
-
"
|
|
113
|
+
"ControlPlaneToken": BearerFormatAuthSetting,
|
|
114
114
|
},
|
|
115
115
|
total=False,
|
|
116
116
|
)
|
|
@@ -176,25 +176,6 @@ class Configuration:
|
|
|
176
176
|
:param date_format: Date format string for serialization.
|
|
177
177
|
|
|
178
178
|
:Example:
|
|
179
|
-
|
|
180
|
-
API Key Authentication Example.
|
|
181
|
-
Given the following security scheme in the OpenAPI specification:
|
|
182
|
-
components:
|
|
183
|
-
securitySchemes:
|
|
184
|
-
cookieAuth: # name for the security scheme
|
|
185
|
-
type: apiKey
|
|
186
|
-
in: cookie
|
|
187
|
-
name: JSESSIONID # cookie name
|
|
188
|
-
|
|
189
|
-
You can programmatically set the cookie:
|
|
190
|
-
|
|
191
|
-
conf = langflow_control_plane_sdk.Configuration(
|
|
192
|
-
api_key={'cookieAuth': 'abc123'}
|
|
193
|
-
api_key_prefix={'cookieAuth': 'JSESSIONID'}
|
|
194
|
-
)
|
|
195
|
-
|
|
196
|
-
The following cookie will be added to the HTTP request:
|
|
197
|
-
Cookie: JSESSIONID abc123
|
|
198
179
|
"""
|
|
199
180
|
|
|
200
181
|
_default: ClassVar[Optional[Self]] = None
|
|
@@ -533,14 +514,13 @@ conf = langflow_control_plane_sdk.Configuration(
|
|
|
533
514
|
:return: The Auth Settings information dict.
|
|
534
515
|
"""
|
|
535
516
|
auth: AuthSettings = {}
|
|
536
|
-
if
|
|
537
|
-
auth['
|
|
538
|
-
'type': '
|
|
517
|
+
if self.access_token is not None:
|
|
518
|
+
auth['ControlPlaneToken'] = {
|
|
519
|
+
'type': 'bearer',
|
|
539
520
|
'in': 'header',
|
|
540
|
-
'
|
|
541
|
-
'
|
|
542
|
-
|
|
543
|
-
),
|
|
521
|
+
'format': 'JWT',
|
|
522
|
+
'key': 'Authorization',
|
|
523
|
+
'value': 'Bearer ' + self.access_token
|
|
544
524
|
}
|
|
545
525
|
return auth
|
|
546
526
|
|
|
@@ -553,7 +533,7 @@ conf = langflow_control_plane_sdk.Configuration(
|
|
|
553
533
|
"OS: {env}\n"\
|
|
554
534
|
"Python Version: {pyversion}\n"\
|
|
555
535
|
"Version of the API: 0.0\n"\
|
|
556
|
-
"SDK Package Version: 0.
|
|
536
|
+
"SDK Package Version: 0.1.1".\
|
|
557
537
|
format(env=sys.platform, pyversion=sys.version)
|
|
558
538
|
|
|
559
539
|
def get_host_settings(self) -> List[HostSetting]:
|
|
@@ -31,7 +31,7 @@ class CreateDeployment(BaseModel):
|
|
|
31
31
|
CreateDeployment
|
|
32
32
|
""" # noqa: E501
|
|
33
33
|
project_id: UUID = Field(description="Langflow project ID used as the Deployment ID.", alias="projectId")
|
|
34
|
-
slug: Annotated[str, Field(min_length=1, strict=True, max_length=63)]
|
|
34
|
+
slug: Annotated[str, Field(min_length=1, strict=True, max_length=63)] = Field(description="Stable, caller-visible name for one deployment, unique within the plane. It is a key, not a display name: it is the only identifier a stateless client can reconstruct between invocations, so it must not be derived from a project name. Names are free text, and `My Project`, `my-project`, and `MY PROJECT!` all reduce to the same slug while anything past 63 characters truncates into further collisions. Supply one, or let the plane generate one and read it back from the response.")
|
|
35
35
|
description: Optional[Annotated[str, Field(strict=True, max_length=4096)]] = None
|
|
36
36
|
flows: List[Flow]
|
|
37
37
|
__properties: ClassVar[List[str]] = ["projectId", "slug", "description", "flows"]
|
|
@@ -31,7 +31,7 @@ class DeploymentDetail(BaseModel):
|
|
|
31
31
|
DeploymentDetail
|
|
32
32
|
""" # noqa: E501
|
|
33
33
|
id: UUID
|
|
34
|
-
slug: Annotated[str, Field(min_length=1, strict=True, max_length=63)]
|
|
34
|
+
slug: Annotated[str, Field(min_length=1, strict=True, max_length=63)] = Field(description="Stable, caller-visible name for one deployment, unique within the plane. It is a key, not a display name: it is the only identifier a stateless client can reconstruct between invocations, so it must not be derived from a project name. Names are free text, and `My Project`, `my-project`, and `MY PROJECT!` all reduce to the same slug while anything past 63 characters truncates into further collisions. Supply one, or let the plane generate one and read it back from the response.")
|
|
35
35
|
description: Optional[Annotated[str, Field(strict=True, max_length=4096)]] = None
|
|
36
36
|
flows: List[FlowRef]
|
|
37
37
|
runtime_base_url: StrictStr = Field(alias="runtimeBaseUrl")
|
|
@@ -30,7 +30,7 @@ class DeploymentListItem(BaseModel):
|
|
|
30
30
|
DeploymentListItem
|
|
31
31
|
""" # noqa: E501
|
|
32
32
|
id: UUID
|
|
33
|
-
slug: Annotated[str, Field(min_length=1, strict=True, max_length=63)]
|
|
33
|
+
slug: Annotated[str, Field(min_length=1, strict=True, max_length=63)] = Field(description="Stable, caller-visible name for one deployment, unique within the plane. It is a key, not a display name: it is the only identifier a stateless client can reconstruct between invocations, so it must not be derived from a project name. Names are free text, and `My Project`, `my-project`, and `MY PROJECT!` all reduce to the same slug while anything past 63 characters truncates into further collisions. Supply one, or let the plane generate one and read it back from the response.")
|
|
34
34
|
description: Optional[Annotated[str, Field(strict=True, max_length=4096)]] = None
|
|
35
35
|
runtime_base_url: StrictStr = Field(alias="runtimeBaseUrl")
|
|
36
36
|
__properties: ClassVar[List[str]] = ["id", "slug", "description", "runtimeBaseUrl"]
|
|
@@ -34,13 +34,16 @@ class ErrorCode(str, Enum):
|
|
|
34
34
|
DEPLOYMENT_NOT_FOUND = 'DEPLOYMENT_NOT_FOUND'
|
|
35
35
|
DEPLOYMENT_SLUG_CONFLICT = 'DEPLOYMENT_SLUG_CONFLICT'
|
|
36
36
|
FLOW_ID_CONFLICT = 'FLOW_ID_CONFLICT'
|
|
37
|
+
FLOW_NAME_CONFLICT = 'FLOW_NAME_CONFLICT'
|
|
37
38
|
VALIDATION_FAILED = 'VALIDATION_FAILED'
|
|
38
39
|
REQUEST_TOO_LARGE = 'REQUEST_TOO_LARGE'
|
|
39
40
|
LANGFLOW_ERROR = 'LANGFLOW_ERROR'
|
|
41
|
+
LANGFLOW_CONFLICT = 'LANGFLOW_CONFLICT'
|
|
40
42
|
LANGFLOW_INVALID_REQUEST = 'LANGFLOW_INVALID_REQUEST'
|
|
41
43
|
LANGFLOW_VALIDATION_FAILED = 'LANGFLOW_VALIDATION_FAILED'
|
|
42
44
|
LANGFLOW_UNAUTHENTICATED = 'LANGFLOW_UNAUTHENTICATED'
|
|
43
45
|
LANGFLOW_FORBIDDEN = 'LANGFLOW_FORBIDDEN'
|
|
46
|
+
LANGFLOW_PROJECT_ID_CONFLICT = 'LANGFLOW_PROJECT_ID_CONFLICT'
|
|
44
47
|
LANGFLOW_PROJECT_ROLLBACK_FAILED = 'LANGFLOW_PROJECT_ROLLBACK_FAILED'
|
|
45
48
|
LANGFLOW_RATE_LIMITED = 'LANGFLOW_RATE_LIMITED'
|
|
46
49
|
LANGFLOW_SERVICE_ERROR = 'LANGFLOW_SERVICE_ERROR'
|
|
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
|