langflow-control-plane-sdk 0.0.0.dev0__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.
- langflow_control_plane_sdk-0.0.0.dev0/LICENSE +21 -0
- langflow_control_plane_sdk-0.0.0.dev0/PKG-INFO +142 -0
- langflow_control_plane_sdk-0.0.0.dev0/README.md +124 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/__init__.py +72 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/api/__init__.py +5 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/api/deployments_api.py +1846 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/api_client.py +822 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/api_response.py +21 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/configuration.py +625 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/exceptions.py +218 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/models/__init__.py +28 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/models/create_deployment.py +108 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/models/deployment_detail.py +105 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/models/deployment_list.py +103 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/models/deployment_list_item.py +103 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/models/error_body.py +96 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/models/error_code.py +57 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/models/error_envelope.py +92 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/models/flow_input.py +104 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/models/flow_payload.py +105 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/models/flow_payload_data.py +103 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/models/patch_deployment.py +89 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/models/replace_deployment.py +99 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/py.typed +0 -0
- langflow_control_plane_sdk-0.0.0.dev0/langflow_control_plane_sdk/rest.py +201 -0
- langflow_control_plane_sdk-0.0.0.dev0/pyproject.toml +49 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Langflow
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: langflow-control-plane-sdk
|
|
3
|
+
Version: 0.0.0.dev0
|
|
4
|
+
Summary: Generated async Python client for the Langflow Control Plane API
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Requires-Dist: httpx>=0.28.1
|
|
9
|
+
Requires-Dist: pydantic>=2.11
|
|
10
|
+
Requires-Dist: python-dateutil>=2.8.2
|
|
11
|
+
Requires-Dist: typing-extensions>=4.7.1
|
|
12
|
+
Provides-Extra: test
|
|
13
|
+
Requires-Dist: build>=1.2.2; extra == 'test'
|
|
14
|
+
Requires-Dist: pytest-asyncio>=1.1.0; extra == 'test'
|
|
15
|
+
Requires-Dist: pytest>=8.4.2; extra == 'test'
|
|
16
|
+
Requires-Dist: pyyaml>=6.0.2; extra == 'test'
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
# Langflow Control Plane Python SDK
|
|
20
|
+
|
|
21
|
+
`langflow-control-plane-sdk` is the generated async Python 3.10+ client for the
|
|
22
|
+
[Langflow Control Plane OpenAPI contract](../../api/openapi.yaml). The import
|
|
23
|
+
package is `langflow_control_plane_sdk`, which is intentionally distinct from
|
|
24
|
+
the `langflow-sdk` package for Langflow's main REST API.
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install langflow-control-plane-sdk
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Normal installs select stable releases. Use
|
|
33
|
+
`pip install --pre langflow-control-plane-sdk` to include development and
|
|
34
|
+
release-candidate builds, or install an exact version such as
|
|
35
|
+
`langflow-control-plane-sdk==0.1.0rc1`.
|
|
36
|
+
|
|
37
|
+
## Configure
|
|
38
|
+
|
|
39
|
+
Set the Control Plane base URL and its temporary pass-through `x-api-key`
|
|
40
|
+
credential on the generated configuration:
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
import langflow_control_plane_sdk as control_plane
|
|
44
|
+
|
|
45
|
+
configuration = control_plane.Configuration(
|
|
46
|
+
host="https://control-plane.example",
|
|
47
|
+
api_key={"LangflowAPIKey": "replace-me"},
|
|
48
|
+
)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The key is sent as `x-api-key`; do not log it. This pass-through authentication
|
|
52
|
+
scheme is temporary. A future authentication change can affect SDK users and is
|
|
53
|
+
therefore treated as semver-significant.
|
|
54
|
+
|
|
55
|
+
## Async CRUD
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
from uuid import uuid4
|
|
59
|
+
|
|
60
|
+
import langflow_control_plane_sdk as control_plane
|
|
61
|
+
|
|
62
|
+
flow_id = uuid4()
|
|
63
|
+
flow = control_plane.FlowInput(
|
|
64
|
+
flow_id=flow_id,
|
|
65
|
+
author_flow_id=flow_id,
|
|
66
|
+
author_flow_version_id=uuid4(),
|
|
67
|
+
name="hello-world",
|
|
68
|
+
payload=control_plane.FlowPayload(
|
|
69
|
+
data=control_plane.FlowPayloadData(nodes=[], edges=[]),
|
|
70
|
+
),
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
async with control_plane.ApiClient(configuration) as client:
|
|
74
|
+
deployments = control_plane.DeploymentsApi(client)
|
|
75
|
+
created = await deployments.create_deployment(
|
|
76
|
+
control_plane.CreateDeployment(slug="hello-world", flows=[flow]),
|
|
77
|
+
)
|
|
78
|
+
fetched = await deployments.get_deployment(created.id)
|
|
79
|
+
updated = await deployments.replace_deployment(
|
|
80
|
+
created.id,
|
|
81
|
+
control_plane.ReplaceDeployment(description="updated", flows=[flow]),
|
|
82
|
+
)
|
|
83
|
+
patched = await deployments.patch_deployment(
|
|
84
|
+
created.id,
|
|
85
|
+
control_plane.PatchDeployment(description="patched"),
|
|
86
|
+
)
|
|
87
|
+
await deployments.delete_deployment(created.id)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
List responses always contain `next_cursor`; it is `None` on the last page.
|
|
91
|
+
Pass a non-null cursor back unchanged:
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
async with control_plane.ApiClient(configuration) as client:
|
|
95
|
+
deployments = control_plane.DeploymentsApi(client)
|
|
96
|
+
page = await deployments.list_deployments(limit=50)
|
|
97
|
+
while page.next_cursor is not None:
|
|
98
|
+
page = await deployments.list_deployments(
|
|
99
|
+
cursor=page.next_cursor,
|
|
100
|
+
limit=50,
|
|
101
|
+
)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Unsuccessful responses raise `ApiException`. For documented responses,
|
|
105
|
+
`exception.data` is a typed `ErrorEnvelope`:
|
|
106
|
+
|
|
107
|
+
```python
|
|
108
|
+
try:
|
|
109
|
+
await deployments.get_deployment(deployment_id)
|
|
110
|
+
except control_plane.ApiException as exception:
|
|
111
|
+
if isinstance(exception.data, control_plane.ErrorEnvelope):
|
|
112
|
+
print(exception.data.error.code, exception.data.error.message)
|
|
113
|
+
raise
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Regenerate and test
|
|
117
|
+
|
|
118
|
+
Generation requires Python 3.10+, Java 11+, and the pinned generator. If Java
|
|
119
|
+
is unavailable, `jdk4py` can optionally provide a local JVM.
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
make openapi-install
|
|
123
|
+
make sdk-py-install
|
|
124
|
+
make openapi-test
|
|
125
|
+
make sdk-py-generate
|
|
126
|
+
make sdk-py-test
|
|
127
|
+
make sdk-py-build
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
When using `jdk4py`, install it in the codegen environment with
|
|
131
|
+
`sdk/openapi-generator/.venv/bin/python -m pip install jdk4py`.
|
|
132
|
+
|
|
133
|
+
Generated package files must not be edited by hand. Change `api/openapi.yaml`,
|
|
134
|
+
the generator options in the root `Makefile`, or the templates, then
|
|
135
|
+
regenerate them.
|
|
136
|
+
|
|
137
|
+
The checked-in SDK uses the base version `0.0.0`. Release builds apply the exact
|
|
138
|
+
`v`-prefixed Git tag version to a temporary build copy; the OpenAPI
|
|
139
|
+
`info.version` independently identifies the API contract line.
|
|
140
|
+
|
|
141
|
+
See the repository's [release guide](../../RELEASE.md) for shared service and
|
|
142
|
+
SDK versioning and tag formats.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Langflow Control Plane Python SDK
|
|
2
|
+
|
|
3
|
+
`langflow-control-plane-sdk` is the generated async Python 3.10+ client for the
|
|
4
|
+
[Langflow Control Plane OpenAPI contract](../../api/openapi.yaml). The import
|
|
5
|
+
package is `langflow_control_plane_sdk`, which is intentionally distinct from
|
|
6
|
+
the `langflow-sdk` package for Langflow's main REST API.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pip install langflow-control-plane-sdk
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Normal installs select stable releases. Use
|
|
15
|
+
`pip install --pre langflow-control-plane-sdk` to include development and
|
|
16
|
+
release-candidate builds, or install an exact version such as
|
|
17
|
+
`langflow-control-plane-sdk==0.1.0rc1`.
|
|
18
|
+
|
|
19
|
+
## Configure
|
|
20
|
+
|
|
21
|
+
Set the Control Plane base URL and its temporary pass-through `x-api-key`
|
|
22
|
+
credential on the generated configuration:
|
|
23
|
+
|
|
24
|
+
```python
|
|
25
|
+
import langflow_control_plane_sdk as control_plane
|
|
26
|
+
|
|
27
|
+
configuration = control_plane.Configuration(
|
|
28
|
+
host="https://control-plane.example",
|
|
29
|
+
api_key={"LangflowAPIKey": "replace-me"},
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The key is sent as `x-api-key`; do not log it. This pass-through authentication
|
|
34
|
+
scheme is temporary. A future authentication change can affect SDK users and is
|
|
35
|
+
therefore treated as semver-significant.
|
|
36
|
+
|
|
37
|
+
## Async CRUD
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from uuid import uuid4
|
|
41
|
+
|
|
42
|
+
import langflow_control_plane_sdk as control_plane
|
|
43
|
+
|
|
44
|
+
flow_id = uuid4()
|
|
45
|
+
flow = control_plane.FlowInput(
|
|
46
|
+
flow_id=flow_id,
|
|
47
|
+
author_flow_id=flow_id,
|
|
48
|
+
author_flow_version_id=uuid4(),
|
|
49
|
+
name="hello-world",
|
|
50
|
+
payload=control_plane.FlowPayload(
|
|
51
|
+
data=control_plane.FlowPayloadData(nodes=[], edges=[]),
|
|
52
|
+
),
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
async with control_plane.ApiClient(configuration) as client:
|
|
56
|
+
deployments = control_plane.DeploymentsApi(client)
|
|
57
|
+
created = await deployments.create_deployment(
|
|
58
|
+
control_plane.CreateDeployment(slug="hello-world", flows=[flow]),
|
|
59
|
+
)
|
|
60
|
+
fetched = await deployments.get_deployment(created.id)
|
|
61
|
+
updated = await deployments.replace_deployment(
|
|
62
|
+
created.id,
|
|
63
|
+
control_plane.ReplaceDeployment(description="updated", flows=[flow]),
|
|
64
|
+
)
|
|
65
|
+
patched = await deployments.patch_deployment(
|
|
66
|
+
created.id,
|
|
67
|
+
control_plane.PatchDeployment(description="patched"),
|
|
68
|
+
)
|
|
69
|
+
await deployments.delete_deployment(created.id)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
List responses always contain `next_cursor`; it is `None` on the last page.
|
|
73
|
+
Pass a non-null cursor back unchanged:
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
async with control_plane.ApiClient(configuration) as client:
|
|
77
|
+
deployments = control_plane.DeploymentsApi(client)
|
|
78
|
+
page = await deployments.list_deployments(limit=50)
|
|
79
|
+
while page.next_cursor is not None:
|
|
80
|
+
page = await deployments.list_deployments(
|
|
81
|
+
cursor=page.next_cursor,
|
|
82
|
+
limit=50,
|
|
83
|
+
)
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Unsuccessful responses raise `ApiException`. For documented responses,
|
|
87
|
+
`exception.data` is a typed `ErrorEnvelope`:
|
|
88
|
+
|
|
89
|
+
```python
|
|
90
|
+
try:
|
|
91
|
+
await deployments.get_deployment(deployment_id)
|
|
92
|
+
except control_plane.ApiException as exception:
|
|
93
|
+
if isinstance(exception.data, control_plane.ErrorEnvelope):
|
|
94
|
+
print(exception.data.error.code, exception.data.error.message)
|
|
95
|
+
raise
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Regenerate and test
|
|
99
|
+
|
|
100
|
+
Generation requires Python 3.10+, Java 11+, and the pinned generator. If Java
|
|
101
|
+
is unavailable, `jdk4py` can optionally provide a local JVM.
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
make openapi-install
|
|
105
|
+
make sdk-py-install
|
|
106
|
+
make openapi-test
|
|
107
|
+
make sdk-py-generate
|
|
108
|
+
make sdk-py-test
|
|
109
|
+
make sdk-py-build
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
When using `jdk4py`, install it in the codegen environment with
|
|
113
|
+
`sdk/openapi-generator/.venv/bin/python -m pip install jdk4py`.
|
|
114
|
+
|
|
115
|
+
Generated package files must not be edited by hand. Change `api/openapi.yaml`,
|
|
116
|
+
the generator options in the root `Makefile`, or the templates, then
|
|
117
|
+
regenerate them.
|
|
118
|
+
|
|
119
|
+
The checked-in SDK uses the base version `0.0.0`. Release builds apply the exact
|
|
120
|
+
`v`-prefixed Git tag version to a temporary build copy; the OpenAPI
|
|
121
|
+
`info.version` independently identifies the API contract line.
|
|
122
|
+
|
|
123
|
+
See the repository's [release guide](../../RELEASE.md) for shared service and
|
|
124
|
+
SDK versioning and tag formats.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
Langflow Control Plane API
|
|
7
|
+
|
|
8
|
+
Manage Langflow Runtime Deployments.
|
|
9
|
+
|
|
10
|
+
The version of the OpenAPI document: 0.0
|
|
11
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
12
|
+
|
|
13
|
+
Do not edit the class manually.
|
|
14
|
+
""" # noqa: E501
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
__version__ = "0.0.0.dev0"
|
|
18
|
+
|
|
19
|
+
# Define package exports
|
|
20
|
+
__all__ = [
|
|
21
|
+
"DeploymentsApi",
|
|
22
|
+
"ApiResponse",
|
|
23
|
+
"ApiClient",
|
|
24
|
+
"Configuration",
|
|
25
|
+
"OpenApiException",
|
|
26
|
+
"ApiTypeError",
|
|
27
|
+
"ApiValueError",
|
|
28
|
+
"ApiKeyError",
|
|
29
|
+
"ApiAttributeError",
|
|
30
|
+
"ApiException",
|
|
31
|
+
"CreateDeployment",
|
|
32
|
+
"DeploymentDetail",
|
|
33
|
+
"DeploymentList",
|
|
34
|
+
"DeploymentListItem",
|
|
35
|
+
"ErrorBody",
|
|
36
|
+
"ErrorCode",
|
|
37
|
+
"ErrorEnvelope",
|
|
38
|
+
"FlowInput",
|
|
39
|
+
"FlowPayload",
|
|
40
|
+
"FlowPayloadData",
|
|
41
|
+
"PatchDeployment",
|
|
42
|
+
"ReplaceDeployment",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
# import apis into sdk package
|
|
46
|
+
from langflow_control_plane_sdk.api.deployments_api import DeploymentsApi as DeploymentsApi
|
|
47
|
+
|
|
48
|
+
# import ApiClient
|
|
49
|
+
from langflow_control_plane_sdk.api_response import ApiResponse as ApiResponse
|
|
50
|
+
from langflow_control_plane_sdk.api_client import ApiClient as ApiClient
|
|
51
|
+
from langflow_control_plane_sdk.configuration import Configuration as Configuration
|
|
52
|
+
from langflow_control_plane_sdk.exceptions import OpenApiException as OpenApiException
|
|
53
|
+
from langflow_control_plane_sdk.exceptions import ApiTypeError as ApiTypeError
|
|
54
|
+
from langflow_control_plane_sdk.exceptions import ApiValueError as ApiValueError
|
|
55
|
+
from langflow_control_plane_sdk.exceptions import ApiKeyError as ApiKeyError
|
|
56
|
+
from langflow_control_plane_sdk.exceptions import ApiAttributeError as ApiAttributeError
|
|
57
|
+
from langflow_control_plane_sdk.exceptions import ApiException as ApiException
|
|
58
|
+
|
|
59
|
+
# import models into sdk package
|
|
60
|
+
from langflow_control_plane_sdk.models.create_deployment import CreateDeployment as CreateDeployment
|
|
61
|
+
from langflow_control_plane_sdk.models.deployment_detail import DeploymentDetail as DeploymentDetail
|
|
62
|
+
from langflow_control_plane_sdk.models.deployment_list import DeploymentList as DeploymentList
|
|
63
|
+
from langflow_control_plane_sdk.models.deployment_list_item import DeploymentListItem as DeploymentListItem
|
|
64
|
+
from langflow_control_plane_sdk.models.error_body import ErrorBody as ErrorBody
|
|
65
|
+
from langflow_control_plane_sdk.models.error_code import ErrorCode as ErrorCode
|
|
66
|
+
from langflow_control_plane_sdk.models.error_envelope import ErrorEnvelope as ErrorEnvelope
|
|
67
|
+
from langflow_control_plane_sdk.models.flow_input import FlowInput as FlowInput
|
|
68
|
+
from langflow_control_plane_sdk.models.flow_payload import FlowPayload as FlowPayload
|
|
69
|
+
from langflow_control_plane_sdk.models.flow_payload_data import FlowPayloadData as FlowPayloadData
|
|
70
|
+
from langflow_control_plane_sdk.models.patch_deployment import PatchDeployment as PatchDeployment
|
|
71
|
+
from langflow_control_plane_sdk.models.replace_deployment import ReplaceDeployment as ReplaceDeployment
|
|
72
|
+
|