Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Generate playground API client

Tomas Valenta75fca24e1c1b
diff --git a/api-service/.openapi-generator/FILES b/api-service/.openapi-generator/FILES
index 7b6bb46ab..38d835836 100644
--- a/api-service/.openapi-generator/FILES
+++ b/api-service/.openapi-generator/FILES
@@ -15,7 +15,7 @@ playground_client/docs/OutTypeStderr.md
playground_client/docs/OutTypeStdout.md
playground_client/docs/ProcessResponse.md
playground_client/docs/ReadFilesystemFileResponse.md
-playground_client/docs/RunProcessParams.md
+playground_client/docs/StartProcessParams.md
playground_client/docs/WriteFilesystemFileRequest.md
playground_client/docs/WriteProcessStdinRequest.md
playground_client/exceptions.py
@@ -31,7 +31,7 @@ playground_client/models/out_type_stderr.py
playground_client/models/out_type_stdout.py
playground_client/models/process_response.py
playground_client/models/read_filesystem_file_response.py
-playground_client/models/run_process_params.py
+playground_client/models/start_process_params.py
playground_client/models/write_filesystem_file_request.py
playground_client/models/write_process_stdin_request.py
playground_client/rest.py
@@ -48,7 +48,7 @@ playground_client/test/test_out_type_stderr.py
playground_client/test/test_out_type_stdout.py
playground_client/test/test_process_response.py
playground_client/test/test_read_filesystem_file_response.py
-playground_client/test/test_run_process_params.py
+playground_client/test/test_start_process_params.py
playground_client/test/test_write_filesystem_file_request.py
playground_client/test/test_write_process_stdin_request.py
playground_client_README.md
diff --git a/api-service/playground_client/__init__.py b/api-service/playground_client/__init__.py
index 7d68bc5ca..e15841a8e 100644
--- a/api-service/playground_client/__init__.py
+++ b/api-service/playground_client/__init__.py
@@ -40,6 +40,6 @@ from playground_client.models.out_type_stderr import OutTypeStderr
from playground_client.models.out_type_stdout import OutTypeStdout
from playground_client.models.process_response import ProcessResponse
from playground_client.models.read_filesystem_file_response import ReadFilesystemFileResponse
-from playground_client.models.run_process_params import RunProcessParams
+from playground_client.models.start_process_params import StartProcessParams
from playground_client.models.write_filesystem_file_request import WriteFilesystemFileRequest
from playground_client.models.write_process_stdin_request import WriteProcessStdinRequest
diff --git a/api-service/playground_client/api/default_api.py b/api-service/playground_client/api/default_api.py
index bd0f1d319..6bf9a70c4 100644
--- a/api-service/playground_client/api/default_api.py
+++ b/api-service/playground_client/api/default_api.py
@@ -24,7 +24,7 @@ from playground_client.models.create_sessions_request import CreateSessionsReque
from playground_client.models.list_filesystem_dir_response import ListFilesystemDirResponse
from playground_client.models.process_response import ProcessResponse
from playground_client.models.read_filesystem_file_response import ReadFilesystemFileResponse
-from playground_client.models.run_process_params import RunProcessParams
+from playground_client.models.start_process_params import StartProcessParams
from playground_client.models.write_filesystem_file_request import WriteFilesystemFileRequest
from playground_client.models.write_process_stdin_request import WriteProcessStdinRequest
@@ -1066,21 +1066,21 @@ class DefaultApi(object):
_request_auth=_params.get('_request_auth'))
@validate_arguments
- def start_process(self, id : StrictStr, wait : Annotated[StrictBool, Field(..., description="if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.")], run_process_params : RunProcessParams, **kwargs) -> ProcessResponse: # noqa: E501
+ def start_process(self, id : StrictStr, wait : Annotated[StrictBool, Field(..., description="if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.")], start_process_params : StartProcessParams, **kwargs) -> ProcessResponse: # noqa: E501
"""start_process # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.start_process(id, wait, run_process_params, async_req=True)
+ >>> thread = api.start_process(id, wait, start_process_params, async_req=True)
>>> result = thread.get()
:param id: (required)
:type id: str
:param wait: if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. (required)
:type wait: bool
- :param run_process_params: (required)
- :type run_process_params: RunProcessParams
+ :param start_process_params: (required)
+ :type start_process_params: StartProcessParams
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1097,24 +1097,24 @@ class DefaultApi(object):
:rtype: ProcessResponse
"""
kwargs['_return_http_data_only'] = True
- return self.start_process_with_http_info(id, wait, run_process_params, **kwargs) # noqa: E501
+ return self.start_process_with_http_info(id, wait, start_process_params, **kwargs) # noqa: E501
@validate_arguments
- def start_process_with_http_info(self, id : StrictStr, wait : Annotated[StrictBool, Field(..., description="if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.")], run_process_params : RunProcessParams, **kwargs): # noqa: E501
+ def start_process_with_http_info(self, id : StrictStr, wait : Annotated[StrictBool, Field(..., description="if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.")], start_process_params : StartProcessParams, **kwargs): # noqa: E501
"""start_process # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.start_process_with_http_info(id, wait, run_process_params, async_req=True)
+ >>> thread = api.start_process_with_http_info(id, wait, start_process_params, async_req=True)
>>> result = thread.get()
:param id: (required)
:type id: str
:param wait: if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. (required)
:type wait: bool
- :param run_process_params: (required)
- :type run_process_params: RunProcessParams
+ :param start_process_params: (required)
+ :type start_process_params: StartProcessParams
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
@@ -1144,7 +1144,7 @@ class DefaultApi(object):
_all_params = [
'id',
'wait',
- 'run_process_params'
+ 'start_process_params'
]
_all_params.extend(
[
@@ -1189,8 +1189,8 @@ class DefaultApi(object):
# process the body parameter
_body_params = None
- if _params['run_process_params']:
- _body_params = _params['run_process_params']
+ if _params['start_process_params']:
+ _body_params = _params['start_process_params']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
diff --git a/api-service/playground_client/docs/DefaultApi.md b/api-service/playground_client/docs/DefaultApi.md
index b9921108b..62f5719ce 100644
--- a/api-service/playground_client/docs/DefaultApi.md
+++ b/api-service/playground_client/docs/DefaultApi.md
@@ -451,7 +451,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **start_process**
-> ProcessResponse start_process(id, wait, run_process_params)
+> ProcessResponse start_process(id, wait, start_process_params)
@@ -477,10 +477,10 @@ with playground_client.ApiClient(configuration) as api_client:
api_instance = playground_client.DefaultApi(api_client)
id = 'id_example' # str |
wait = True # bool | if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.
- run_process_params = playground_client.RunProcessParams() # RunProcessParams |
+ start_process_params = playground_client.StartProcessParams() # StartProcessParams |
try:
- api_response = api_instance.start_process(id, wait, run_process_params)
+ api_response = api_instance.start_process(id, wait, start_process_params)
print("The response of DefaultApi->start_process:\n")
pprint(api_response)
except Exception as e:
@@ -493,7 +493,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| |
**wait** | **bool**| if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. |
- **run_process_params** | [**RunProcessParams**](RunProcessParams.md)| |
+ **start_process_params** | [**StartProcessParams**](StartProcessParams.md)| |
### Return type
diff --git a/api-service/playground_client/docs/RunProcessParams.md b/api-service/playground_client/docs/StartProcessParams.md
similarity index 53%
rename from api-service/playground_client/docs/RunProcessParams.md
rename to api-service/playground_client/docs/StartProcessParams.md
index 1372ce0a2..376008f90 100644
--- a/api-service/playground_client/docs/RunProcessParams.md
+++ b/api-service/playground_client/docs/StartProcessParams.md
@@ -1,4 +1,4 @@
-# RunProcessParams
+# StartProcessParams
## Properties
@@ -11,19 +11,19 @@ Name | Type | Description | Notes
## Example
```python
-from playground_client.models.run_process_params import RunProcessParams
+from playground_client.models.start_process_params import StartProcessParams
# TODO update the JSON string below
json = "{}"
-# create an instance of RunProcessParams from a JSON string
-run_process_params_instance = RunProcessParams.from_json(json)
+# create an instance of StartProcessParams from a JSON string
+start_process_params_instance = StartProcessParams.from_json(json)
# print the JSON string representation of the object
-print RunProcessParams.to_json()
+print StartProcessParams.to_json()
# convert the object into a dict
-run_process_params_dict = run_process_params_instance.to_dict()
-# create an instance of RunProcessParams from a dict
-run_process_params_form_dict = run_process_params.from_dict(run_process_params_dict)
+start_process_params_dict = start_process_params_instance.to_dict()
+# create an instance of StartProcessParams from a dict
+start_process_params_form_dict = start_process_params.from_dict(start_process_params_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/api-service/playground_client/models/__init__.py b/api-service/playground_client/models/__init__.py
index a6521119f..7baf60813 100644
--- a/api-service/playground_client/models/__init__.py
+++ b/api-service/playground_client/models/__init__.py
@@ -25,6 +25,6 @@ from playground_client.models.out_type_stderr import OutTypeStderr
from playground_client.models.out_type_stdout import OutTypeStdout
from playground_client.models.process_response import ProcessResponse
from playground_client.models.read_filesystem_file_response import ReadFilesystemFileResponse
-from playground_client.models.run_process_params import RunProcessParams
+from playground_client.models.start_process_params import StartProcessParams
from playground_client.models.write_filesystem_file_request import WriteFilesystemFileRequest
from playground_client.models.write_process_stdin_request import WriteProcessStdinRequest
diff --git a/api-service/playground_client/models/run_process_params.py b/api-service/playground_client/models/start_process_params.py
similarity index 81%
rename from api-service/playground_client/models/run_process_params.py
rename to api-service/playground_client/models/start_process_params.py
index e5653beeb..60376c2e4 100644
--- a/api-service/playground_client/models/run_process_params.py
+++ b/api-service/playground_client/models/start_process_params.py
@@ -20,7 +20,7 @@ import json
from typing import Dict, Optional
from pydantic import BaseModel, Field, StrictStr
-class RunProcessParams(BaseModel):
+class StartProcessParams(BaseModel):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -44,8 +44,8 @@ class RunProcessParams(BaseModel):
return json.dumps(self.to_dict())
@classmethod
- def from_json(cls, json_str: str) -> RunProcessParams:
- """Create an instance of RunProcessParams from a JSON string"""
+ def from_json(cls, json_str: str) -> StartProcessParams:
+ """Create an instance of StartProcessParams from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self):
@@ -57,20 +57,20 @@ class RunProcessParams(BaseModel):
return _dict
@classmethod
- def from_dict(cls, obj: dict) -> RunProcessParams:
- """Create an instance of RunProcessParams from a dict"""
+ def from_dict(cls, obj: dict) -> StartProcessParams:
+ """Create an instance of StartProcessParams from a dict"""
if obj is None:
return None
if type(obj) is not dict:
- return RunProcessParams.parse_obj(obj)
+ return StartProcessParams.parse_obj(obj)
# raise errors for additional fields in the input
for _key in obj.keys():
if _key not in cls.__properties:
- raise ValueError("Error due to additional fields (not defined in RunProcessParams) in the input: " + obj)
+ raise ValueError("Error due to additional fields (not defined in StartProcessParams) in the input: " + obj)
- _obj = RunProcessParams.parse_obj({
+ _obj = StartProcessParams.parse_obj({
"cmd": obj.get("cmd"),
"env_vars": obj.get("envVars"),
"rootdir": obj.get("rootdir")
diff --git a/api-service/playground_client/test/test_run_process_params.py b/api-service/playground_client/test/test_start_process_params.py
similarity index 68%
rename from api-service/playground_client/test/test_run_process_params.py
rename to api-service/playground_client/test/test_start_process_params.py
index e148b0b1b..a65e71d02 100644
--- a/api-service/playground_client/test/test_run_process_params.py
+++ b/api-service/playground_client/test/test_start_process_params.py
@@ -16,11 +16,11 @@ import unittest
import datetime
import playground_client
-from playground_client.models.run_process_params import RunProcessParams # noqa: E501
+from playground_client.models.start_process_params import StartProcessParams # noqa: E501
from playground_client.rest import ApiException
-class TestRunProcessParams(unittest.TestCase):
- """RunProcessParams unit test stubs"""
+class TestStartProcessParams(unittest.TestCase):
+ """StartProcessParams unit test stubs"""
def setUp(self):
pass
@@ -29,15 +29,15 @@ class TestRunProcessParams(unittest.TestCase):
pass
def make_instance(self, include_optional):
- """Test RunProcessParams
+ """Test StartProcessParams
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included """
- # uncomment below to create an instance of `RunProcessParams`
+ # uncomment below to create an instance of `StartProcessParams`
"""
- model = playground_client.models.run_process_params.RunProcessParams() # noqa: E501
+ model = playground_client.models.start_process_params.StartProcessParams() # noqa: E501
if include_optional :
- return RunProcessParams(
+ return StartProcessParams(
cmd = '',
env_vars = {
'key' : ''
@@ -45,13 +45,13 @@ class TestRunProcessParams(unittest.TestCase):
rootdir = ''
)
else :
- return RunProcessParams(
+ return StartProcessParams(
cmd = '',
)
"""
- def testRunProcessParams(self):
- """Test RunProcessParams"""
+ def testStartProcessParams(self):
+ """Test StartProcessParams"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
diff --git a/api-service/playground_client_README.md b/api-service/playground_client_README.md
index 6f0807b21..0cedb2f23 100644
--- a/api-service/playground_client_README.md
+++ b/api-service/playground_client_README.md
@@ -90,7 +90,7 @@ Class | Method | HTTP request | Description
- [OutTypeStdout](playground_client/docs/OutTypeStdout.md)
- [ProcessResponse](playground_client/docs/ProcessResponse.md)
- [ReadFilesystemFileResponse](playground_client/docs/ReadFilesystemFileResponse.md)
- - [RunProcessParams](playground_client/docs/RunProcessParams.md)
+ - [StartProcessParams](playground_client/docs/StartProcessParams.md)
- [WriteFilesystemFileRequest](playground_client/docs/WriteFilesystemFileRequest.md)
- [WriteProcessStdinRequest](playground_client/docs/WriteProcessStdinRequest.md)