Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Sync is da way (#197)
Jakub Novák6feaccf76119
diff --git a/.changeset/chatty-shirts-carry.md b/.changeset/chatty-shirts-carry.mdnew file mode 100644index 000000000..8f0351c72--- /dev/null+++ b/.changeset/chatty-shirts-carry.md@@ -0,0 +1,5 @@+---+'@e2b/python-sdk': minor+---++Rewrite Python SDK to syncdiff --git a/packages/python-sdk/Makefile b/packages/python-sdk/Makefileindex 3dcf603ee..de0c3792b 100644--- a/packages/python-sdk/Makefile+++ b/packages/python-sdk/Makefile@@ -7,7 +7,6 @@ generate-v2:# After released, use npx -yes @openapitools/openapi-generator-cli generatejava -jar <OPENAPI-TOOL-PATH>/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \-i ../../spec/openapi.yml \- --library asyncio \-g python \-o ./e2b/api \--global-property apis,models,supportingFiles,modelDocs=false \@@ -29,7 +28,6 @@ generate-v1:rm -rf ./e2b/api/v1npx -yes @openapitools/openapi-generator-cli generate \-i ../../spec/openapi.yml \- --library asyncio \-g python-nextgen \-o ./e2b/api \--global-property apis,models,supportingFiles,modelDocs=false \@@ -43,3 +41,6 @@ generate-v1:rm -r ./e2b/api/.openapi-generatormv ./e2b/api/__init__.py.bck ./e2b/api/__init__.pyblack .++.PHONY: generate+generate: generate-v1 generate-v2diff --git a/packages/python-sdk/e2b/__init__.py b/packages/python-sdk/e2b/__init__.pyindex 3643cb524..eaf762d70 100644--- a/packages/python-sdk/e2b/__init__.py+++ b/packages/python-sdk/e2b/__init__.py@@ -1,17 +1,11 @@from .session import (Session,- SyncSession,FilesystemOperation,FilesystemWatcher,FileInfo,FilesystemEvent,FilesystemManager,TerminalManager,- SyncFilesystemWatcher,- SyncFilesystemManager,- SyncTerminalManager,- SyncProcessManager,- SyncProcess,Terminal,ProcessManager,Process,@@ -26,5 +20,4 @@ from .session import (ProcessOutput,TerminalOutput,run_code,- run_code_sync,)diff --git a/packages/python-sdk/e2b/api/v1/client/api/default_api.py b/packages/python-sdk/e2b/api/v1/client/api/default_api.pyindex deb32527a..f2dfc6964 100644--- a/packages/python-sdk/e2b/api/v1/client/api/default_api.py+++ b/packages/python-sdk/e2b/api/v1/client/api/default_api.py@@ -18,7 +18,6 @@ import warningsfrom pydantic import validate_arguments, ValidationErrorfrom typing_extensions import Annotated-from typing import overload, Optional, Union, Awaitablefrom e2b.api.v1.client.api_client import ApiClient@@ -38,20 +37,8 @@ class DefaultApi(object):api_client = ApiClient.get_default()self.api_client = api_client- @overload- async def health_get(self, **kwargs) -> None: # noqa: E501- ...-- @overload- def health_get(- self, async_req: Optional[bool] = True, **kwargs- ) -> None: # noqa: E501- ...-@validate_arguments- def health_get(- self, async_req: Optional[bool] = None, **kwargs- ) -> Union[None, Awaitable[None]]: # noqa: E501+ def health_get(self, **kwargs) -> None: # noqa: E501"""health_get # noqa: E501Health check # noqa: E501@@ -77,8 +64,6 @@ class DefaultApi(object):raise ValueError("Error! Please call the health_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.health_get_with_http_info(**kwargs) # noqa: E501@validate_argumentsdiff --git a/packages/python-sdk/e2b/api/v1/client/api/envs_api.py b/packages/python-sdk/e2b/api/v1/client/api/envs_api.pyindex a2ba1d006..aa7cb94c3 100644--- a/packages/python-sdk/e2b/api/v1/client/api/envs_api.py+++ b/packages/python-sdk/e2b/api/v1/client/api/envs_api.py@@ -18,7 +18,6 @@ import warningsfrom pydantic import validate_arguments, ValidationErrorfrom typing_extensions import Annotated-from typing import overload, Optional, Union, Awaitablefrom pydantic import StrictStr@@ -47,30 +46,10 @@ class EnvsApi(object):api_client = ApiClient.get_default()self.api_client = api_client- @overload- async def envs_code_snippet_id_delete(- self, api_key: StrictStr, code_snippet_id: StrictStr, **kwargs- ) -> None: # noqa: E501- ...-- @overload- def envs_code_snippet_id_delete(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- async_req: Optional[bool] = True,- **kwargs- ) -> None: # noqa: E501- ...-@validate_argumentsdef envs_code_snippet_id_delete(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- async_req: Optional[bool] = None,- **kwargs- ) -> Union[None, Awaitable[None]]: # noqa: E501+ self, api_key: StrictStr, code_snippet_id: StrictStr, **kwargs+ ) -> None: # noqa: E501"""envs_code_snippet_id_delete # noqa: E501Delete the code snippet environment # noqa: E501@@ -100,8 +79,6 @@ class EnvsApi(object):raise ValueError("Error! Please call the envs_code_snippet_id_delete_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.envs_code_snippet_id_delete_with_http_info(api_key, code_snippet_id, **kwargs) # noqa: E501@@ -221,30 +198,10 @@ class EnvsApi(object):_request_auth=_params.get("_request_auth"),)- @overload- async def envs_code_snippet_id_patch(- self, api_key: StrictStr, code_snippet_id: StrictStr, **kwargs- ) -> None: # noqa: E501- ...-- @overload- def envs_code_snippet_id_patch(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- async_req: Optional[bool] = True,- **kwargs- ) -> None: # noqa: E501- ...-@validate_argumentsdef envs_code_snippet_id_patch(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- async_req: Optional[bool] = None,- **kwargs- ) -> Union[None, Awaitable[None]]: # noqa: E501+ self, api_key: StrictStr, code_snippet_id: StrictStr, **kwargs+ ) -> None: # noqa: E501"""envs_code_snippet_id_patch # noqa: E501Update the environment of the code snippet to match the edit environment # noqa: E501@@ -274,8 +231,6 @@ class EnvsApi(object):raise ValueError("Error! Please call the envs_code_snippet_id_patch_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.envs_code_snippet_id_patch_with_http_info(api_key, code_snippet_id, **kwargs) # noqa: E501@@ -395,36 +350,14 @@ class EnvsApi(object):_request_auth=_params.get("_request_auth"),)- @overload- async def envs_code_snippet_id_post(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- new_environment: NewEnvironment,- **kwargs- ) -> None: # noqa: E501- ...-- @overload- def envs_code_snippet_id_post(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- new_environment: NewEnvironment,- async_req: Optional[bool] = True,- **kwargs- ) -> None: # noqa: E501- ...-@validate_argumentsdef envs_code_snippet_id_post(self,api_key: StrictStr,code_snippet_id: StrictStr,new_environment: NewEnvironment,- async_req: Optional[bool] = None,**kwargs- ) -> Union[None, Awaitable[None]]: # noqa: E501+ ) -> None: # noqa: E501"""envs_code_snippet_id_post # noqa: E501Create a new env for a code snippet # noqa: E501@@ -456,8 +389,6 @@ class EnvsApi(object):raise ValueError("Error! Please call the envs_code_snippet_id_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.envs_code_snippet_id_post_with_http_info(api_key, code_snippet_id, new_environment, **kwargs) # noqa: E501@@ -594,36 +525,14 @@ class EnvsApi(object):_request_auth=_params.get("_request_auth"),)- @overload- async def envs_code_snippet_id_state_put(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- environment_state_update: EnvironmentStateUpdate,- **kwargs- ) -> None: # noqa: E501- ...-- @overload- def envs_code_snippet_id_state_put(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- environment_state_update: EnvironmentStateUpdate,- async_req: Optional[bool] = True,- **kwargs- ) -> None: # noqa: E501- ...-@validate_argumentsdef envs_code_snippet_id_state_put(self,api_key: StrictStr,code_snippet_id: StrictStr,environment_state_update: EnvironmentStateUpdate,- async_req: Optional[bool] = None,**kwargs- ) -> Union[None, Awaitable[None]]: # noqa: E501+ ) -> None: # noqa: E501"""envs_code_snippet_id_state_put # noqa: E501Update the state of the environment # noqa: E501@@ -655,8 +564,6 @@ class EnvsApi(object):raise ValueError("Error! Please call the envs_code_snippet_id_state_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.envs_code_snippet_id_state_put_with_http_info(api_key, code_snippet_id, environment_state_update, **kwargs) # noqa: E501@@ -793,36 +700,14 @@ class EnvsApi(object):_request_auth=_params.get("_request_auth"),)- @overload- async def envs_code_snippet_id_title_put(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- environment_title_update: EnvironmentTitleUpdate,- **kwargs- ) -> None: # noqa: E501- ...-- @overload- def envs_code_snippet_id_title_put(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- environment_title_update: EnvironmentTitleUpdate,- async_req: Optional[bool] = True,- **kwargs- ) -> None: # noqa: E501- ...-@validate_argumentsdef envs_code_snippet_id_title_put(self,api_key: StrictStr,code_snippet_id: StrictStr,environment_title_update: EnvironmentTitleUpdate,- async_req: Optional[bool] = None,**kwargs- ) -> Union[None, Awaitable[None]]: # noqa: E501+ ) -> None: # noqa: E501"""envs_code_snippet_id_title_put # noqa: E501Update the title of the environment # noqa: E501@@ -854,8 +739,6 @@ class EnvsApi(object):raise ValueError("Error! Please call the envs_code_snippet_id_title_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.envs_code_snippet_id_title_put_with_http_info(api_key, code_snippet_id, environment_title_update, **kwargs) # noqa: E501@@ -992,24 +875,10 @@ class EnvsApi(object):_request_auth=_params.get("_request_auth"),)- @overload- async def envs_get(- self, api_key: StrictStr, **kwargs- ) -> List[EnvsGet200ResponseInner]: # noqa: E501- ...-- @overload- def envs_get(- self, api_key: StrictStr, async_req: Optional[bool] = True, **kwargs- ) -> List[EnvsGet200ResponseInner]: # noqa: E501- ...-@validate_argumentsdef envs_get(- self, api_key: StrictStr, async_req: Optional[bool] = None, **kwargs- ) -> Union[- List[EnvsGet200ResponseInner], Awaitable[List[EnvsGet200ResponseInner]]- ]: # noqa: E501+ self, api_key: StrictStr, **kwargs+ ) -> List[EnvsGet200ResponseInner]: # noqa: E501"""envs_get # noqa: E501List all environments # noqa: E501@@ -1037,8 +906,6 @@ class EnvsApi(object):raise ValueError("Error! Please call the envs_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.envs_get_with_http_info(api_key, **kwargs) # noqa: E501@validate_arguments@@ -1156,30 +1023,10 @@ class EnvsApi(object):_request_auth=_params.get("_request_auth"),)- @overload- async def envs_post(- self, api_key: StrictStr, new_environment: NewEnvironment, **kwargs- ) -> Environment: # noqa: E501- ...-- @overload- def envs_post(- self,- api_key: StrictStr,- new_environment: NewEnvironment,- async_req: Optional[bool] = True,- **kwargs- ) -> Environment: # noqa: E501- ...-@validate_argumentsdef envs_post(- self,- api_key: StrictStr,- new_environment: NewEnvironment,- async_req: Optional[bool] = None,- **kwargs- ) -> Union[Environment, Awaitable[Environment]]: # noqa: E501+ self, api_key: StrictStr, new_environment: NewEnvironment, **kwargs+ ) -> Environment: # noqa: E501"""envs_post # noqa: E501Create a new environment # noqa: E501@@ -1209,8 +1056,6 @@ class EnvsApi(object):raise ValueError("Error! Please call the envs_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.envs_post_with_http_info(api_key, new_environment, **kwargs) # noqa: E501diff --git a/packages/python-sdk/e2b/api/v1/client/api/sessions_api.py b/packages/python-sdk/e2b/api/v1/client/api/sessions_api.pyindex 99b2a0a84..835830e7d 100644--- a/packages/python-sdk/e2b/api/v1/client/api/sessions_api.py+++ b/packages/python-sdk/e2b/api/v1/client/api/sessions_api.py@@ -18,7 +18,6 @@ import warningsfrom pydantic import validate_arguments, ValidationErrorfrom typing_extensions import Annotated-from typing import overload, Optional, Union, Awaitablefrom pydantic import StrictStr@@ -47,24 +46,10 @@ class SessionsApi(object):api_client = ApiClient.get_default()self.api_client = api_client- @overload- async def sessions_get(- self, api_key: StrictStr, **kwargs- ) -> List[SessionsGet200ResponseInner]: # noqa: E501- ...-- @overload- def sessions_get(- self, api_key: StrictStr, async_req: Optional[bool] = True, **kwargs- ) -> List[SessionsGet200ResponseInner]: # noqa: E501- ...-@validate_argumentsdef sessions_get(- self, api_key: StrictStr, async_req: Optional[bool] = None, **kwargs- ) -> Union[- List[SessionsGet200ResponseInner], Awaitable[List[SessionsGet200ResponseInner]]- ]: # noqa: E501+ self, api_key: StrictStr, **kwargs+ ) -> List[SessionsGet200ResponseInner]: # noqa: E501"""sessions_get # noqa: E501List all sessions # noqa: E501@@ -92,8 +77,6 @@ class SessionsApi(object):raise ValueError("Error! Please call the sessions_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.sessions_get_with_http_info(api_key, **kwargs) # noqa: E501@validate_arguments@@ -211,30 +194,10 @@ class SessionsApi(object):_request_auth=_params.get("_request_auth"),)- @overload- async def sessions_post(- self, new_session: NewSession, api_key: Optional[StrictStr] = None, **kwargs- ) -> Session: # noqa: E501- ...-- @overload- def sessions_post(- self,- new_session: NewSession,- api_key: Optional[StrictStr] = None,- async_req: Optional[bool] = True,- **kwargs- ) -> Session: # noqa: E501- ...-@validate_argumentsdef sessions_post(- self,- new_session: NewSession,- api_key: Optional[StrictStr] = None,- async_req: Optional[bool] = None,- **kwargs- ) -> Union[Session, Awaitable[Session]]: # noqa: E501+ self, new_session: NewSession, api_key: Optional[StrictStr] = None, **kwargs+ ) -> Session: # noqa: E501"""sessions_post # noqa: E501Create a session on the server # noqa: E501@@ -264,8 +227,6 @@ class SessionsApi(object):raise ValueError("Error! Please call the sessions_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.sessions_post_with_http_info(new_session, api_key, **kwargs) # noqa: E501@@ -399,30 +360,10 @@ class SessionsApi(object):_request_auth=_params.get("_request_auth"),)- @overload- async def sessions_session_id_delete(- self, api_key: StrictStr, session_id: StrictStr, **kwargs- ) -> None: # noqa: E501- ...-- @overload- def sessions_session_id_delete(- self,- api_key: StrictStr,- session_id: StrictStr,- async_req: Optional[bool] = True,- **kwargs- ) -> None: # noqa: E501- ...-@validate_argumentsdef sessions_session_id_delete(- self,- api_key: StrictStr,- session_id: StrictStr,- async_req: Optional[bool] = None,- **kwargs- ) -> Union[None, Awaitable[None]]: # noqa: E501+ self, api_key: StrictStr, session_id: StrictStr, **kwargs+ ) -> None: # noqa: E501"""sessions_session_id_delete # noqa: E501Delete a session on the server # noqa: E501@@ -452,8 +393,6 @@ class SessionsApi(object):raise ValueError("Error! Please call the sessions_session_id_delete_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.sessions_session_id_delete_with_http_info(api_key, session_id, **kwargs) # noqa: E501@@ -573,30 +512,10 @@ class SessionsApi(object):_request_auth=_params.get("_request_auth"),)- @overload- async def sessions_session_id_refresh_post(- self, session_id: StrictStr, api_key: Optional[StrictStr] = None, **kwargs- ) -> None: # noqa: E501- ...-- @overload- def sessions_session_id_refresh_post(- self,- session_id: StrictStr,- api_key: Optional[StrictStr] = None,- async_req: Optional[bool] = True,- **kwargs- ) -> None: # noqa: E501- ...-@validate_argumentsdef sessions_session_id_refresh_post(- self,- session_id: StrictStr,- api_key: Optional[StrictStr] = None,- async_req: Optional[bool] = None,- **kwargs- ) -> Union[None, Awaitable[None]]: # noqa: E501+ self, session_id: StrictStr, api_key: Optional[StrictStr] = None, **kwargs+ ) -> None: # noqa: E501"""sessions_session_id_refresh_post # noqa: E501Refresh the session extending its time to live # noqa: E501@@ -626,8 +545,6 @@ class SessionsApi(object):raise ValueError("Error! Please call the sessions_session_id_refresh_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.sessions_session_id_refresh_post_with_http_info(session_id, api_key, **kwargs) # noqa: E501diff --git a/packages/python-sdk/e2b/api/v1/client/api_client.py b/packages/python-sdk/e2b/api/v1/client/api_client.pyindex f7b0b69d2..523285a1c 100644--- a/packages/python-sdk/e2b/api/v1/client/api_client.py+++ b/packages/python-sdk/e2b/api/v1/client/api_client.py@@ -85,14 +85,13 @@ class ApiClient(object):self.user_agent = "OpenAPI-Generator/1.0.0/python"self.client_side_validation = configuration.client_side_validation- async def __aenter__(self):+ def __enter__(self):return self- async def __aexit__(self, exc_type, exc_value, traceback):- await self.close()+ def __exit__(self, exc_type, exc_value, traceback):+ self.close()- async def close(self):- await self.rest_client.close()+ def close(self):if self._pool:self._pool.close()self._pool.join()@@ -148,7 +147,7 @@ class ApiClient(object):"""cls._default = default- async def __call_api(+ def __call_api(self,resource_path,method,@@ -227,7 +226,7 @@ class ApiClient(object):try:# perform request and return response- response_data = await self.request(+ response_data = self.request(method,url,query_params=query_params,diff --git a/packages/python-sdk/e2b/api/v1/client/configuration.py b/packages/python-sdk/e2b/api/v1/client/configuration.pyindex a206b6d70..9b5d72b64 100644--- a/packages/python-sdk/e2b/api/v1/client/configuration.py+++ b/packages/python-sdk/e2b/api/v1/client/configuration.py@@ -14,6 +14,7 @@import copyimport logging+import multiprocessingimport sysimport urllib3@@ -179,9 +180,12 @@ class Configuration(object):Set this to the SNI value expected by the server."""- self.connection_pool_maxsize = 100- """This value is passed to the aiohttp to limit simultaneous connections.- Default values is 100, None means no-limit.+ self.connection_pool_maxsize = multiprocessing.cpu_count() * 5+ """urllib3 connection pool's maximum number of connections saved+ per pool. urllib3 uses 1 connection as default value, but this is+ not the best value when you are making a lot of possibly parallel+ requests to the same host, which is often the case here.+ cpu_count * 5 is used as default value to increase performance."""self.proxy = Nonediff --git a/packages/python-sdk/e2b/api/v1/client/rest.py b/packages/python-sdk/e2b/api/v1/client/rest.pyindex 1b9ff0eba..b74a6d3af 100644--- a/packages/python-sdk/e2b/api/v1/client/rest.py+++ b/packages/python-sdk/e2b/api/v1/client/rest.py@@ -18,58 +18,98 @@ import loggingimport reimport ssl-import aiohttpfrom urllib.parse import urlencode, quote_plus+import urllib3++from e2b.api.v1.client.exceptions import (+ ApiException,+ UnauthorizedException,+ ForbiddenException,+ NotFoundException,+ ServiceException,+ ApiValueError,+)-from e2b.api.v1.client.exceptions import ApiException, ApiValueErrorlogger = logging.getLogger(__name__)class RESTResponse(io.IOBase):- def __init__(self, resp, data):- self.aiohttp_response = resp+ def __init__(self, resp):+ self.urllib3_response = respself.status = resp.statusself.reason = resp.reason- self.data = data+ self.data = resp.datadef getheaders(self):- """Returns a CIMultiDictProxy of the response headers."""- return self.aiohttp_response.headers+ """Returns a dictionary of the response headers."""+ return self.urllib3_response.headersdef getheader(self, name, default=None):"""Returns a given response header."""- return self.aiohttp_response.headers.get(name, default)+ return self.urllib3_response.headers.get(name, default)class RESTClientObject(object):def __init__(self, configuration, pools_size=4, maxsize=None):- # maxsize is number of requests to host that are allowed in parallel- if maxsize is None:- maxsize = configuration.connection_pool_maxsize+ # urllib3.PoolManager will pass all kw parameters to connectionpool+ # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501+ # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501+ # maxsize is the number of requests to host that are allowed in parallel # noqa: E501+ # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501- ssl_context = ssl.create_default_context(cafile=configuration.ssl_ca_cert)- if configuration.cert_file:- ssl_context.load_cert_chain(- configuration.cert_file, keyfile=configuration.key_file- )+ # cert_reqs+ if configuration.verify_ssl:+ cert_reqs = ssl.CERT_REQUIRED+ else:+ cert_reqs = ssl.CERT_NONE- if not configuration.verify_ssl:- ssl_context.check_hostname = False- ssl_context.verify_mode = ssl.CERT_NONE+ addition_pool_args = {}+ if configuration.assert_hostname is not None:+ addition_pool_args[+ "assert_hostname"+ ] = configuration.assert_hostname # noqa: E501- connector = aiohttp.TCPConnector(limit=maxsize, ssl=ssl_context)+ if configuration.retries is not None:+ addition_pool_args["retries"] = configuration.retries- self.proxy = configuration.proxy- self.proxy_headers = configuration.proxy_headers+ if configuration.tls_server_name:+ addition_pool_args["server_hostname"] = configuration.tls_server_name- # https pool manager- self.pool_manager = aiohttp.ClientSession(connector=connector, trust_env=True)+ if configuration.socket_options is not None:+ addition_pool_args["socket_options"] = configuration.socket_options- async def close(self):- await self.pool_manager.close()+ if maxsize is None:+ if configuration.connection_pool_maxsize is not None:+ maxsize = configuration.connection_pool_maxsize+ else:+ maxsize = 4- async def request(+ # https pool manager+ if configuration.proxy:+ self.pool_manager = urllib3.ProxyManager(+ num_pools=pools_size,+ maxsize=maxsize,+ cert_reqs=cert_reqs,+ ca_certs=configuration.ssl_ca_cert,+ cert_file=configuration.cert_file,+ key_file=configuration.key_file,+ proxy_url=configuration.proxy,+ proxy_headers=configuration.proxy_headers,+ **addition_pool_args+ )+ else:+ self.pool_manager = urllib3.PoolManager(+ num_pools=pools_size,+ maxsize=maxsize,+ cert_reqs=cert_reqs,+ ca_certs=configuration.ssl_ca_cert,+ cert_file=configuration.cert_file,+ key_file=configuration.key_file,+ **addition_pool_args+ )++ def request(self,method,url,@@ -80,7 +120,7 @@ class RESTClientObject(object):_preload_content=True,_request_timeout=None,):- """Execute request+ """Perform requests.:param method: http request method:param url: http request url@@ -90,8 +130,9 @@ class RESTClientObject(object)::param post_params: request post parameters,`application/x-www-form-urlencoded`and `multipart/form-data`- :param _preload_content: this is a non-applicable field for- the AiohttpClient.+ :param _preload_content: if False, the urllib3.HTTPResponse object will+ be returned without reading/decoding response+ data. Default is True.:param _request_timeout: timeout setting for this request. If onenumber provided, it will be total requesttimeout. It can also be a pair (tuple) of@@ -110,70 +151,117 @@ class RESTClientObject(object):# url already contains the URL query string# so reset query_params to empty dictquery_params = {}- timeout = _request_timeout or 5 * 60-- if "Content-Type" not in headers:- headers["Content-Type"] = "application/json"-- args = {"method": method, "url": url, "timeout": timeout, "headers": headers}-- if self.proxy:- args["proxy"] = self.proxy- if self.proxy_headers:- args["proxy_headers"] = self.proxy_headers-- if query_params:- args["url"] += "?" + urlencode(query_params)-- # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`- if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]:- if re.search("json", headers["Content-Type"], re.IGNORECASE):- if body is not None:- body = json.dumps(body)- args["data"] = body- elif (- headers["Content-Type"] == "application/x-www-form-urlencoded"- ): # noqa: E501- args["data"] = aiohttp.FormData(post_params)- elif headers["Content-Type"] == "multipart/form-data":- # must del headers['Content-Type'], or the correct- # Content-Type which generated by aiohttp- del headers["Content-Type"]- data = aiohttp.FormData()- for param in post_params:- k, v = param- if isinstance(v, tuple) and len(v) == 3:- data.add_field(k, value=v[1], filename=v[0], content_type=v[2])- else:- data.add_field(k, v)- args["data"] = data-- # Pass a `bytes` parameter directly in the body to support- # other content types than Json when `body` argument is provided- # in serialized form- elif isinstance(body, bytes):- args["data"] = body++ timeout = None+ if _request_timeout:+ if isinstance(_request_timeout, (int, float)): # noqa: E501,F821+ timeout = urllib3.Timeout(total=_request_timeout)+ elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2:+ timeout = urllib3.Timeout(+ connect=_request_timeout[0], read=_request_timeout[1]+ )++ try:+ # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`+ if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]:+ # no content type provided or payload is json+ if not headers.get("Content-Type") or re.search(+ "json", headers["Content-Type"], re.IGNORECASE+ ):+ request_body = None+ if body is not None:+ request_body = json.dumps(body)+ r = self.pool_manager.request(+ method,+ url,+ body=request_body,+ preload_content=_preload_content,+ timeout=timeout,+ headers=headers,+ )+ elif (+ headers["Content-Type"] == "application/x-www-form-urlencoded"+ ): # noqa: E501+ r = self.pool_manager.request(+ method,+ url,+ fields=post_params,+ encode_multipart=False,+ preload_content=_preload_content,+ timeout=timeout,+ headers=headers,+ )+ elif headers["Content-Type"] == "multipart/form-data":+ # must del headers['Content-Type'], or the correct+ # Content-Type which generated by urllib3 will be+ # overwritten.+ del headers["Content-Type"]+ r = self.pool_manager.request(+ method,+ url,+ fields=post_params,+ encode_multipart=True,+ preload_content=_preload_content,+ timeout=timeout,+ headers=headers,+ )+ # Pass a `string` parameter directly in the body to support+ # other content types than Json when `body` argument is+ # provided in serialized form+ elif isinstance(body, str) or isinstance(body, bytes):+ request_body = body+ r = self.pool_manager.request(+ method,+ url,+ body=request_body,+ preload_content=_preload_content,+ timeout=timeout,+ headers=headers,+ )+ else:+ # Cannot generate the request from given parameters+ msg = """Cannot prepare a request message for provided+ arguments. Please check that your arguments match+ declared content type."""+ raise ApiException(status=0, reason=msg)+ # For `GET`, `HEAD`else:- # Cannot generate the request from given parameters- msg = """Cannot prepare a request message for provided- arguments. Please check that your arguments match- declared content type."""- raise ApiException(status=0, reason=msg)+ r = self.pool_manager.request(+ method,+ url,+ fields={},+ preload_content=_preload_content,+ timeout=timeout,+ headers=headers,+ )+ except urllib3.exceptions.SSLError as e:+ msg = "{0}\n{1}".format(type(e).__name__, str(e))+ raise ApiException(status=0, reason=msg)- r = await self.pool_manager.request(**args)if _preload_content:- data = await r.read()- r = RESTResponse(r, data)+ r = RESTResponse(r)# log response bodylogger.debug("response body: %s", r.data)- if not 200 <= r.status <= 299:- raise ApiException(http_resp=r)+ if not 200 <= r.status <= 299:+ if r.status == 401:+ raise UnauthorizedException(http_resp=r)++ if r.status == 403:+ raise ForbiddenException(http_resp=r)++ if r.status == 404:+ raise NotFoundException(http_resp=r)++ if 500 <= r.status <= 599:+ raise ServiceException(http_resp=r)++ raise ApiException(http_resp=r)return r- async def get_request(+ def get_request(self,url,headers=None,@@ -181,7 +269,7 @@ class RESTClientObject(object):_preload_content=True,_request_timeout=None,):- return await self.request(+ return self.request("GET",url,headers=headers,@@ -190,7 +278,7 @@ class RESTClientObject(object):query_params=query_params,)- async def head_request(+ def head_request(self,url,headers=None,@@ -198,7 +286,7 @@ class RESTClientObject(object):_preload_content=True,_request_timeout=None,):- return await self.request(+ return self.request("HEAD",url,headers=headers,@@ -207,7 +295,7 @@ class RESTClientObject(object):query_params=query_params,)- async def options_request(+ def options_request(self,url,headers=None,@@ -217,7 +305,7 @@ class RESTClientObject(object):_preload_content=True,_request_timeout=None,):- return await self.request(+ return self.request("OPTIONS",url,headers=headers,@@ -228,7 +316,7 @@ class RESTClientObject(object):body=body,)- async def delete_request(+ def delete_request(self,url,headers=None,@@ -237,7 +325,7 @@ class RESTClientObject(object):_preload_content=True,_request_timeout=None,):- return await self.request(+ return self.request("DELETE",url,headers=headers,@@ -247,7 +335,7 @@ class RESTClientObject(object):body=body,)- async def post_request(+ def post_request(self,url,headers=None,@@ -257,7 +345,7 @@ class RESTClientObject(object):_preload_content=True,_request_timeout=None,):- return await self.request(+ return self.request("POST",url,headers=headers,@@ -268,7 +356,7 @@ class RESTClientObject(object):body=body,)- async def put_request(+ def put_request(self,url,headers=None,@@ -278,7 +366,7 @@ class RESTClientObject(object):_preload_content=True,_request_timeout=None,):- return await self.request(+ return self.request("PUT",url,headers=headers,@@ -289,7 +377,7 @@ class RESTClientObject(object):body=body,)- async def patch_request(+ def patch_request(self,url,headers=None,@@ -299,7 +387,7 @@ class RESTClientObject(object):_preload_content=True,_request_timeout=None,):- return await self.request(+ return self.request("PATCH",url,headers=headers,diff --git a/packages/python-sdk/e2b/api/v1/client_README.md b/packages/python-sdk/e2b/api/v1/client_README.mdindex b8b83e196..d5d7ae565 100644--- a/packages/python-sdk/e2b/api/v1/client_README.md+++ b/packages/python-sdk/e2b/api/v1/client_README.md@@ -19,7 +19,6 @@ To be able to use it, you will need these dependencies in your own package that* urllib3 >= 1.25.3* python-dateutil-* aiohttp* pydantic* aenum@@ -44,12 +43,12 @@ configuration = e2b.api.v1.client.Configuration(# Enter a context with an instance of the API client-async with e2b.api.v1.client.ApiClient(configuration) as api_client:+with e2b.api.v1.client.ApiClient(configuration) as api_client:# Create an instance of the API classapi_instance = e2b.api.v1.client.DefaultApi(api_client)try:- await api_instance.health_get()+ api_instance.health_get()except ApiException as e:print("Exception when calling DefaultApi->health_get: %s\n" % e)diff --git a/packages/python-sdk/e2b/api/v2/client/api/default_api.py b/packages/python-sdk/e2b/api/v2/client/api/default_api.pyindex 687e35e19..c7cf451fd 100644--- a/packages/python-sdk/e2b/api/v2/client/api/default_api.py+++ b/packages/python-sdk/e2b/api/v2/client/api/default_api.py@@ -18,7 +18,6 @@ import warningsfrom pydantic import validate_call, ValidationErrorfrom typing_extensions import Annotated-from typing import overload, Optional, Union, Awaitablefrom e2b.api.v2.client.api_client import ApiClient@@ -38,20 +37,8 @@ class DefaultApi:api_client = ApiClient.get_default()self.api_client = api_client- @overload- async def health_get(self, **kwargs) -> None: # noqa: E501- ...-- @overload- def health_get(- self, async_req: Optional[bool] = True, **kwargs- ) -> None: # noqa: E501- ...-@validate_call- def health_get(- self, async_req: Optional[bool] = None, **kwargs- ) -> Union[None, Awaitable[None]]: # noqa: E501+ def health_get(self, **kwargs) -> None: # noqa: E501"""health_get # noqa: E501Health check # noqa: E501@@ -76,8 +63,6 @@ class DefaultApi:if "_preload_content" in kwargs:message = "Error! Please call the health_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501raise ValueError(message)- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.health_get_with_http_info(**kwargs) # noqa: E501@validate_calldiff --git a/packages/python-sdk/e2b/api/v2/client/api/envs_api.py b/packages/python-sdk/e2b/api/v2/client/api/envs_api.pyindex d8099fd8a..86649f35b 100644--- a/packages/python-sdk/e2b/api/v2/client/api/envs_api.py+++ b/packages/python-sdk/e2b/api/v2/client/api/envs_api.py@@ -18,7 +18,6 @@ import warningsfrom pydantic import validate_call, ValidationErrorfrom typing_extensions import Annotated-from typing import overload, Optional, Union, Awaitablefrom pydantic import StrictStr@@ -46,30 +45,10 @@ class EnvsApi:api_client = ApiClient.get_default()self.api_client = api_client- @overload- async def envs_code_snippet_id_delete(- self, api_key: StrictStr, code_snippet_id: StrictStr, **kwargs- ) -> None: # noqa: E501- ...-- @overload- def envs_code_snippet_id_delete(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- async_req: Optional[bool] = True,- **kwargs- ) -> None: # noqa: E501- ...-@validate_calldef envs_code_snippet_id_delete(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- async_req: Optional[bool] = None,- **kwargs- ) -> Union[None, Awaitable[None]]: # noqa: E501+ self, api_key: StrictStr, code_snippet_id: StrictStr, **kwargs+ ) -> None: # noqa: E501"""envs_code_snippet_id_delete # noqa: E501Delete the code snippet environment # noqa: E501@@ -98,8 +77,6 @@ class EnvsApi:if "_preload_content" in kwargs:message = "Error! Please call the envs_code_snippet_id_delete_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501raise ValueError(message)- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.envs_code_snippet_id_delete_with_http_info(api_key, code_snippet_id, **kwargs) # noqa: E501@@ -219,30 +196,10 @@ class EnvsApi:_request_auth=_params.get("_request_auth"),)- @overload- async def envs_code_snippet_id_patch(- self, api_key: StrictStr, code_snippet_id: StrictStr, **kwargs- ) -> None: # noqa: E501- ...-- @overload- def envs_code_snippet_id_patch(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- async_req: Optional[bool] = True,- **kwargs- ) -> None: # noqa: E501- ...-@validate_calldef envs_code_snippet_id_patch(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- async_req: Optional[bool] = None,- **kwargs- ) -> Union[None, Awaitable[None]]: # noqa: E501+ self, api_key: StrictStr, code_snippet_id: StrictStr, **kwargs+ ) -> None: # noqa: E501"""envs_code_snippet_id_patch # noqa: E501Update the environment of the code snippet to match the edit environment # noqa: E501@@ -271,8 +228,6 @@ class EnvsApi:if "_preload_content" in kwargs:message = "Error! Please call the envs_code_snippet_id_patch_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501raise ValueError(message)- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.envs_code_snippet_id_patch_with_http_info(api_key, code_snippet_id, **kwargs) # noqa: E501@@ -392,36 +347,14 @@ class EnvsApi:_request_auth=_params.get("_request_auth"),)- @overload- async def envs_code_snippet_id_post(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- new_environment: NewEnvironment,- **kwargs- ) -> None: # noqa: E501- ...-- @overload- def envs_code_snippet_id_post(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- new_environment: NewEnvironment,- async_req: Optional[bool] = True,- **kwargs- ) -> None: # noqa: E501- ...-@validate_calldef envs_code_snippet_id_post(self,api_key: StrictStr,code_snippet_id: StrictStr,new_environment: NewEnvironment,- async_req: Optional[bool] = None,**kwargs- ) -> Union[None, Awaitable[None]]: # noqa: E501+ ) -> None: # noqa: E501"""envs_code_snippet_id_post # noqa: E501Create a new env for a code snippet # noqa: E501@@ -452,8 +385,6 @@ class EnvsApi:if "_preload_content" in kwargs:message = "Error! Please call the envs_code_snippet_id_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501raise ValueError(message)- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.envs_code_snippet_id_post_with_http_info(api_key, code_snippet_id, new_environment, **kwargs) # noqa: E501@@ -590,36 +521,14 @@ class EnvsApi:_request_auth=_params.get("_request_auth"),)- @overload- async def envs_code_snippet_id_state_put(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- environment_state_update: EnvironmentStateUpdate,- **kwargs- ) -> None: # noqa: E501- ...-- @overload- def envs_code_snippet_id_state_put(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- environment_state_update: EnvironmentStateUpdate,- async_req: Optional[bool] = True,- **kwargs- ) -> None: # noqa: E501- ...-@validate_calldef envs_code_snippet_id_state_put(self,api_key: StrictStr,code_snippet_id: StrictStr,environment_state_update: EnvironmentStateUpdate,- async_req: Optional[bool] = None,**kwargs- ) -> Union[None, Awaitable[None]]: # noqa: E501+ ) -> None: # noqa: E501"""envs_code_snippet_id_state_put # noqa: E501Update the state of the environment # noqa: E501@@ -650,8 +559,6 @@ class EnvsApi:if "_preload_content" in kwargs:message = "Error! Please call the envs_code_snippet_id_state_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501raise ValueError(message)- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.envs_code_snippet_id_state_put_with_http_info(api_key, code_snippet_id, environment_state_update, **kwargs) # noqa: E501@@ -788,36 +695,14 @@ class EnvsApi:_request_auth=_params.get("_request_auth"),)- @overload- async def envs_code_snippet_id_title_put(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- environment_title_update: EnvironmentTitleUpdate,- **kwargs- ) -> None: # noqa: E501- ...-- @overload- def envs_code_snippet_id_title_put(- self,- api_key: StrictStr,- code_snippet_id: StrictStr,- environment_title_update: EnvironmentTitleUpdate,- async_req: Optional[bool] = True,- **kwargs- ) -> None: # noqa: E501- ...-@validate_calldef envs_code_snippet_id_title_put(self,api_key: StrictStr,code_snippet_id: StrictStr,environment_title_update: EnvironmentTitleUpdate,- async_req: Optional[bool] = None,**kwargs- ) -> Union[None, Awaitable[None]]: # noqa: E501+ ) -> None: # noqa: E501"""envs_code_snippet_id_title_put # noqa: E501Update the title of the environment # noqa: E501@@ -848,8 +733,6 @@ class EnvsApi:if "_preload_content" in kwargs:message = "Error! Please call the envs_code_snippet_id_title_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501raise ValueError(message)- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.envs_code_snippet_id_title_put_with_http_info(api_key, code_snippet_id, environment_title_update, **kwargs) # noqa: E501@@ -986,22 +869,8 @@ class EnvsApi:_request_auth=_params.get("_request_auth"),)- @overload- async def envs_get(- self, api_key: StrictStr, **kwargs- ) -> List[Environment]: # noqa: E501- ...-- @overload- def envs_get(- self, api_key: StrictStr, async_req: Optional[bool] = True, **kwargs- ) -> List[Environment]: # noqa: E501- ...-@validate_call- def envs_get(- self, api_key: StrictStr, async_req: Optional[bool] = None, **kwargs- ) -> Union[List[Environment], Awaitable[List[Environment]]]: # noqa: E501+ def envs_get(self, api_key: StrictStr, **kwargs) -> List[Environment]: # noqa: E501"""envs_get # noqa: E501List all environments # noqa: E501@@ -1028,8 +897,6 @@ class EnvsApi:if "_preload_content" in kwargs:message = "Error! Please call the envs_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501raise ValueError(message)- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.envs_get_with_http_info(api_key, **kwargs) # noqa: E501@validate_call@@ -1147,30 +1014,10 @@ class EnvsApi:_request_auth=_params.get("_request_auth"),)- @overload- async def envs_post(- self, api_key: StrictStr, new_environment: NewEnvironment, **kwargs- ) -> Environment: # noqa: E501- ...-- @overload- def envs_post(- self,- api_key: StrictStr,- new_environment: NewEnvironment,- async_req: Optional[bool] = True,- **kwargs- ) -> Environment: # noqa: E501- ...-@validate_calldef envs_post(- self,- api_key: StrictStr,- new_environment: NewEnvironment,- async_req: Optional[bool] = None,- **kwargs- ) -> Union[Environment, Awaitable[Environment]]: # noqa: E501+ self, api_key: StrictStr, new_environment: NewEnvironment, **kwargs+ ) -> Environment: # noqa: E501"""envs_post # noqa: E501Create a new environment # noqa: E501@@ -1199,8 +1046,6 @@ class EnvsApi:if "_preload_content" in kwargs:message = "Error! Please call the envs_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501raise ValueError(message)- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.envs_post_with_http_info(api_key, new_environment, **kwargs) # noqa: E501diff --git a/packages/python-sdk/e2b/api/v2/client/api/sessions_api.py b/packages/python-sdk/e2b/api/v2/client/api/sessions_api.pyindex 47031b9ef..4336537bd 100644--- a/packages/python-sdk/e2b/api/v2/client/api/sessions_api.py+++ b/packages/python-sdk/e2b/api/v2/client/api/sessions_api.py@@ -18,7 +18,6 @@ import warningsfrom pydantic import validate_call, ValidationErrorfrom typing_extensions import Annotated-from typing import overload, Optional, Union, Awaitablefrom pydantic import StrictStr@@ -44,22 +43,8 @@ class SessionsApi:api_client = ApiClient.get_default()self.api_client = api_client- @overload- async def sessions_get(- self, api_key: StrictStr, **kwargs- ) -> List[Session]: # noqa: E501- ...-- @overload- def sessions_get(- self, api_key: StrictStr, async_req: Optional[bool] = True, **kwargs- ) -> List[Session]: # noqa: E501- ...-@validate_call- def sessions_get(- self, api_key: StrictStr, async_req: Optional[bool] = None, **kwargs- ) -> Union[List[Session], Awaitable[List[Session]]]: # noqa: E501+ def sessions_get(self, api_key: StrictStr, **kwargs) -> List[Session]: # noqa: E501"""sessions_get # noqa: E501List all sessions # noqa: E501@@ -86,8 +71,6 @@ class SessionsApi:if "_preload_content" in kwargs:message = "Error! Please call the sessions_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501raise ValueError(message)- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.sessions_get_with_http_info(api_key, **kwargs) # noqa: E501@validate_call@@ -205,30 +188,10 @@ class SessionsApi:_request_auth=_params.get("_request_auth"),)- @overload- async def sessions_post(- self, new_session: NewSession, api_key: Optional[StrictStr] = None, **kwargs- ) -> Session: # noqa: E501- ...-- @overload- def sessions_post(- self,- new_session: NewSession,- api_key: Optional[StrictStr] = None,- async_req: Optional[bool] = True,- **kwargs- ) -> Session: # noqa: E501- ...-@validate_calldef sessions_post(- self,- new_session: NewSession,- api_key: Optional[StrictStr] = None,- async_req: Optional[bool] = None,- **kwargs- ) -> Union[Session, Awaitable[Session]]: # noqa: E501+ self, new_session: NewSession, api_key: Optional[StrictStr] = None, **kwargs+ ) -> Session: # noqa: E501"""sessions_post # noqa: E501Create a session on the server # noqa: E501@@ -257,8 +220,6 @@ class SessionsApi:if "_preload_content" in kwargs:message = "Error! Please call the sessions_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501raise ValueError(message)- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.sessions_post_with_http_info(new_session, api_key, **kwargs) # noqa: E501@@ -392,30 +353,10 @@ class SessionsApi:_request_auth=_params.get("_request_auth"),)- @overload- async def sessions_session_id_delete(- self, api_key: StrictStr, session_id: StrictStr, **kwargs- ) -> None: # noqa: E501- ...-- @overload- def sessions_session_id_delete(- self,- api_key: StrictStr,- session_id: StrictStr,- async_req: Optional[bool] = True,- **kwargs- ) -> None: # noqa: E501- ...-@validate_calldef sessions_session_id_delete(- self,- api_key: StrictStr,- session_id: StrictStr,- async_req: Optional[bool] = None,- **kwargs- ) -> Union[None, Awaitable[None]]: # noqa: E501+ self, api_key: StrictStr, session_id: StrictStr, **kwargs+ ) -> None: # noqa: E501"""sessions_session_id_delete # noqa: E501Delete a session on the server # noqa: E501@@ -444,8 +385,6 @@ class SessionsApi:if "_preload_content" in kwargs:message = "Error! Please call the sessions_session_id_delete_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501raise ValueError(message)- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.sessions_session_id_delete_with_http_info(api_key, session_id, **kwargs) # noqa: E501@@ -565,30 +504,10 @@ class SessionsApi:_request_auth=_params.get("_request_auth"),)- @overload- async def sessions_session_id_refresh_post(- self, session_id: StrictStr, api_key: Optional[StrictStr] = None, **kwargs- ) -> None: # noqa: E501- ...-- @overload- def sessions_session_id_refresh_post(- self,- session_id: StrictStr,- api_key: Optional[StrictStr] = None,- async_req: Optional[bool] = True,- **kwargs- ) -> None: # noqa: E501- ...-@validate_calldef sessions_session_id_refresh_post(- self,- session_id: StrictStr,- api_key: Optional[StrictStr] = None,- async_req: Optional[bool] = None,- **kwargs- ) -> Union[None, Awaitable[None]]: # noqa: E501+ self, session_id: StrictStr, api_key: Optional[StrictStr] = None, **kwargs+ ) -> None: # noqa: E501"""sessions_session_id_refresh_post # noqa: E501Refresh the session extending its time to live # noqa: E501@@ -617,8 +536,6 @@ class SessionsApi:if "_preload_content" in kwargs:message = "Error! Please call the sessions_session_id_refresh_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501raise ValueError(message)- if async_req is not None:- kwargs["async_req"] = async_reqreturn self.sessions_session_id_refresh_post_with_http_info(session_id, api_key, **kwargs) # noqa: E501diff --git a/packages/python-sdk/e2b/api/v2/client/api_client.py b/packages/python-sdk/e2b/api/v2/client/api_client.pyindex adad1647d..52b65a7ba 100644--- a/packages/python-sdk/e2b/api/v2/client/api_client.py+++ b/packages/python-sdk/e2b/api/v2/client/api_client.py@@ -85,14 +85,13 @@ class ApiClient:self.user_agent = "OpenAPI-Generator/1.0.0/python"self.client_side_validation = configuration.client_side_validation- async def __aenter__(self):+ def __enter__(self):return self- async def __aexit__(self, exc_type, exc_value, traceback):- await self.close()+ def __exit__(self, exc_type, exc_value, traceback):+ self.close()- async def close(self):- await self.rest_client.close()+ def close(self):if self._pool:self._pool.close()self._pool.join()@@ -148,7 +147,7 @@ class ApiClient:"""cls._default = default- async def __call_api(+ def __call_api(self,resource_path,method,@@ -227,7 +226,7 @@ class ApiClient:try:# perform request and return response- response_data = await self.request(+ response_data = self.request(method,url,query_params=query_params,diff --git a/packages/python-sdk/e2b/api/v2/client/configuration.py b/packages/python-sdk/e2b/api/v2/client/configuration.pyindex a86e81724..f083e0bb4 100644--- a/packages/python-sdk/e2b/api/v2/client/configuration.py+++ b/packages/python-sdk/e2b/api/v2/client/configuration.py@@ -14,6 +14,7 @@import copyimport logging+import multiprocessingimport sysimport urllib3@@ -179,9 +180,12 @@ class Configuration:Set this to the SNI value expected by the server."""- self.connection_pool_maxsize = 100- """This value is passed to the aiohttp to limit simultaneous connections.- Default values is 100, None means no-limit.+ self.connection_pool_maxsize = multiprocessing.cpu_count() * 5+ """urllib3 connection pool's maximum number of connections saved+ per pool. urllib3 uses 1 connection as default value, but this is+ not the best value when you are making a lot of possibly parallel+ requests to the same host, which is often the case here.+ cpu_count * 5 is used as default value to increase performance."""self.proxy = Nonediff --git a/packages/python-sdk/e2b/api/v2/client/rest.py b/packages/python-sdk/e2b/api/v2/client/rest.pyindex 857a1d2ea..4bb580c8c 100644--- a/packages/python-sdk/e2b/api/v2/client/rest.py+++ b/packages/python-sdk/e2b/api/v2/client/rest.py@@ -18,58 +18,99 @@ import loggingimport reimport ssl-import aiohttpfrom urllib.parse import urlencode, quote_plus+import urllib3++from e2b.api.v2.client.exceptions import (+ ApiException,+ UnauthorizedException,+ ForbiddenException,+ NotFoundException,+ ServiceException,+ ApiValueError,+ BadRequestException,+)-from e2b.api.v2.client.exceptions import ApiException, ApiValueErrorlogger = logging.getLogger(__name__)class RESTResponse(io.IOBase):- def __init__(self, resp, data) -> None:- self.aiohttp_response = resp+ def __init__(self, resp) -> None:+ self.urllib3_response = respself.status = resp.statusself.reason = resp.reason- self.data = data+ self.data = resp.datadef getheaders(self):- """Returns a CIMultiDictProxy of the response headers."""- return self.aiohttp_response.headers+ """Returns a dictionary of the response headers."""+ return self.urllib3_response.headersdef getheader(self, name, default=None):"""Returns a given response header."""- return self.aiohttp_response.headers.get(name, default)+ return self.urllib3_response.headers.get(name, default)class RESTClientObject:def __init__(self, configuration, pools_size=4, maxsize=None) -> None:- # maxsize is number of requests to host that are allowed in parallel- if maxsize is None:- maxsize = configuration.connection_pool_maxsize+ # urllib3.PoolManager will pass all kw parameters to connectionpool+ # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501+ # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501+ # maxsize is the number of requests to host that are allowed in parallel # noqa: E501+ # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501- ssl_context = ssl.create_default_context(cafile=configuration.ssl_ca_cert)- if configuration.cert_file:- ssl_context.load_cert_chain(- configuration.cert_file, keyfile=configuration.key_file- )+ # cert_reqs+ if configuration.verify_ssl:+ cert_reqs = ssl.CERT_REQUIRED+ else:+ cert_reqs = ssl.CERT_NONE- if not configuration.verify_ssl:- ssl_context.check_hostname = False- ssl_context.verify_mode = ssl.CERT_NONE+ addition_pool_args = {}+ if configuration.assert_hostname is not None:+ addition_pool_args[+ "assert_hostname"+ ] = configuration.assert_hostname # noqa: E501- connector = aiohttp.TCPConnector(limit=maxsize, ssl=ssl_context)+ if configuration.retries is not None:+ addition_pool_args["retries"] = configuration.retries- self.proxy = configuration.proxy- self.proxy_headers = configuration.proxy_headers+ if configuration.tls_server_name:+ addition_pool_args["server_hostname"] = configuration.tls_server_name- # https pool manager- self.pool_manager = aiohttp.ClientSession(connector=connector, trust_env=True)+ if configuration.socket_options is not None:+ addition_pool_args["socket_options"] = configuration.socket_options- async def close(self):- await self.pool_manager.close()+ if maxsize is None:+ if configuration.connection_pool_maxsize is not None:+ maxsize = configuration.connection_pool_maxsize+ else:+ maxsize = 4++ # https pool manager+ if configuration.proxy:+ self.pool_manager = urllib3.ProxyManager(+ num_pools=pools_size,+ maxsize=maxsize,+ cert_reqs=cert_reqs,+ ca_certs=configuration.ssl_ca_cert,+ cert_file=configuration.cert_file,+ key_file=configuration.key_file,+ proxy_url=configuration.proxy,+ proxy_headers=configuration.proxy_headers,+ **addition_pool_args+ )+ else:+ self.pool_manager = urllib3.PoolManager(+ num_pools=pools_size,+ maxsize=maxsize,+ cert_reqs=cert_reqs,+ ca_certs=configuration.ssl_ca_cert,+ cert_file=configuration.cert_file,+ key_file=configuration.key_file,+ **addition_pool_args+ )- async def request(+ def request(self,method,url,@@ -80,7 +121,7 @@ class RESTClientObject:_preload_content=True,_request_timeout=None,):- """Execute request+ """Perform requests.:param method: http request method:param url: http request url@@ -90,8 +131,9 @@ class RESTClientObject::param post_params: request post parameters,`application/x-www-form-urlencoded`and `multipart/form-data`- :param _preload_content: this is a non-applicable field for- the AiohttpClient.+ :param _preload_content: if False, the urllib3.HTTPResponse object will+ be returned without reading/decoding response+ data. Default is True.:param _request_timeout: timeout setting for this request. If onenumber provided, it will be total requesttimeout. It can also be a pair (tuple) of@@ -110,70 +152,120 @@ class RESTClientObject:# url already contains the URL query string# so reset query_params to empty dictquery_params = {}- timeout = _request_timeout or 5 * 60-- if "Content-Type" not in headers:- headers["Content-Type"] = "application/json"-- args = {"method": method, "url": url, "timeout": timeout, "headers": headers}-- if self.proxy:- args["proxy"] = self.proxy- if self.proxy_headers:- args["proxy_headers"] = self.proxy_headers-- if query_params:- args["url"] += "?" + urlencode(query_params)-- # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`- if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]:- if re.search("json", headers["Content-Type"], re.IGNORECASE):- if body is not None:- body = json.dumps(body)- args["data"] = body- elif (- headers["Content-Type"] == "application/x-www-form-urlencoded"- ): # noqa: E501- args["data"] = aiohttp.FormData(post_params)- elif headers["Content-Type"] == "multipart/form-data":- # must del headers['Content-Type'], or the correct- # Content-Type which generated by aiohttp- del headers["Content-Type"]- data = aiohttp.FormData()- for param in post_params:- k, v = param- if isinstance(v, tuple) and len(v) == 3:- data.add_field(k, value=v[1], filename=v[0], content_type=v[2])- else:- data.add_field(k, v)- args["data"] = data-- # Pass a `bytes` parameter directly in the body to support- # other content types than Json when `body` argument is provided- # in serialized form- elif isinstance(body, bytes):- args["data"] = body++ timeout = None+ if _request_timeout:+ if isinstance(_request_timeout, (int, float)): # noqa: E501,F821+ timeout = urllib3.Timeout(total=_request_timeout)+ elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2:+ timeout = urllib3.Timeout(+ connect=_request_timeout[0], read=_request_timeout[1]+ )++ try:+ # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`+ if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]:+ # no content type provided or payload is json+ if not headers.get("Content-Type") or re.search(+ "json", headers["Content-Type"], re.IGNORECASE+ ):+ request_body = None+ if body is not None:+ request_body = json.dumps(body)+ r = self.pool_manager.request(+ method,+ url,+ body=request_body,+ preload_content=_preload_content,+ timeout=timeout,+ headers=headers,+ )+ elif (+ headers["Content-Type"] == "application/x-www-form-urlencoded"+ ): # noqa: E501+ r = self.pool_manager.request(+ method,+ url,+ fields=post_params,+ encode_multipart=False,+ preload_content=_preload_content,+ timeout=timeout,+ headers=headers,+ )+ elif headers["Content-Type"] == "multipart/form-data":+ # must del headers['Content-Type'], or the correct+ # Content-Type which generated by urllib3 will be+ # overwritten.+ del headers["Content-Type"]+ r = self.pool_manager.request(+ method,+ url,+ fields=post_params,+ encode_multipart=True,+ preload_content=_preload_content,+ timeout=timeout,+ headers=headers,+ )+ # Pass a `string` parameter directly in the body to support+ # other content types than Json when `body` argument is+ # provided in serialized form+ elif isinstance(body, str) or isinstance(body, bytes):+ request_body = body+ r = self.pool_manager.request(+ method,+ url,+ body=request_body,+ preload_content=_preload_content,+ timeout=timeout,+ headers=headers,+ )+ else:+ # Cannot generate the request from given parameters+ msg = """Cannot prepare a request message for provided+ arguments. Please check that your arguments match+ declared content type."""+ raise ApiException(status=0, reason=msg)+ # For `GET`, `HEAD`else:- # Cannot generate the request from given parameters- msg = """Cannot prepare a request message for provided- arguments. Please check that your arguments match- declared content type."""- raise ApiException(status=0, reason=msg)+ r = self.pool_manager.request(+ method,+ url,+ fields={},+ preload_content=_preload_content,+ timeout=timeout,+ headers=headers,+ )+ except urllib3.exceptions.SSLError as e:+ msg = "{0}\n{1}".format(type(e).__name__, str(e))+ raise ApiException(status=0, reason=msg)- r = await self.pool_manager.request(**args)if _preload_content:- data = await r.read()- r = RESTResponse(r, data)+ r = RESTResponse(r)# log response bodylogger.debug("response body: %s", r.data)- if not 200 <= r.status <= 299:- raise ApiException(http_resp=r)+ if not 200 <= r.status <= 299:+ if r.status == 400:+ raise BadRequestException(http_resp=r)++ if r.status == 401:+ raise UnauthorizedException(http_resp=r)++ if r.status == 403:+ raise ForbiddenException(http_resp=r)++ if r.status == 404:+ raise NotFoundException(http_resp=r)++ if 500 <= r.status <= 599:+ raise ServiceException(http_resp=r)++ raise ApiException(http_resp=r)return r- async def get_request(+ def get_request(self,url,headers=None,@@ -181,7 +273,7 @@ class RESTClientObject:_preload_content=True,_request_timeout=None,):- return await self.request(+ return self.request("GET",url,headers=headers,@@ -190,7 +282,7 @@ class RESTClientObject:query_params=query_params,)- async def head_request(+ def head_request(self,url,headers=None,@@ -198,7 +290,7 @@ class RESTClientObject:_preload_content=True,_request_timeout=None,):- return await self.request(+ return self.request("HEAD",url,headers=headers,@@ -207,7 +299,7 @@ class RESTClientObject:query_params=query_params,)- async def options_request(+ def options_request(self,url,headers=None,@@ -217,7 +309,7 @@ class RESTClientObject:_preload_content=True,_request_timeout=None,):- return await self.request(+ return self.request("OPTIONS",url,headers=headers,@@ -228,7 +320,7 @@ class RESTClientObject:body=body,)- async def delete_request(+ def delete_request(self,url,headers=None,@@ -237,7 +329,7 @@ class RESTClientObject:_preload_content=True,_request_timeout=None,):- return await self.request(+ return self.request("DELETE",url,headers=headers,@@ -247,7 +339,7 @@ class RESTClientObject:body=body,)- async def post_request(+ def post_request(self,url,headers=None,@@ -257,7 +349,7 @@ class RESTClientObject:_preload_content=True,_request_timeout=None,):- return await self.request(+ return self.request("POST",url,headers=headers,@@ -268,7 +360,7 @@ class RESTClientObject:body=body,)- async def put_request(+ def put_request(self,url,headers=None,@@ -278,7 +370,7 @@ class RESTClientObject:_preload_content=True,_request_timeout=None,):- return await self.request(+ return self.request("PUT",url,headers=headers,@@ -289,7 +381,7 @@ class RESTClientObject:body=body,)- async def patch_request(+ def patch_request(self,url,headers=None,@@ -299,7 +391,7 @@ class RESTClientObject:_preload_content=True,_request_timeout=None,):- return await self.request(+ return self.request("PATCH",url,headers=headers,diff --git a/packages/python-sdk/e2b/api/v2/client_README.md b/packages/python-sdk/e2b/api/v2/client_README.mdindex e08ae2cec..b8f10e56a 100644--- a/packages/python-sdk/e2b/api/v2/client_README.md+++ b/packages/python-sdk/e2b/api/v2/client_README.md@@ -19,7 +19,6 @@ To be able to use it, you will need these dependencies in your own package that* urllib3 >= 1.25.3* python-dateutil-* aiohttp* pydantic* aenum@@ -44,12 +43,12 @@ configuration = e2b.api.v2.client.Configuration(# Enter a context with an instance of the API client-async with e2b.api.v2.client.ApiClient(configuration) as api_client:+with e2b.api.v2.client.ApiClient(configuration) as api_client:# Create an instance of the API classapi_instance = e2b.api.v2.client.DefaultApi(api_client)try:- await api_instance.health_get()+ api_instance.health_get()except ApiException as e:print("Exception when calling DefaultApi->health_get: %s\n" % e)diff --git a/packages/python-sdk/e2b/session/__init__.py b/packages/python-sdk/e2b/session/__init__.pyindex 9d6bc7ac8..4b320f151 100644--- a/packages/python-sdk/e2b/session/__init__.py+++ b/packages/python-sdk/e2b/session/__init__.py@@ -7,27 +7,22 @@ from .exception import (SessionException,TerminalException,)-from .filesystem import FileInfo, FilesystemManager, SyncFilesystemManager+from .filesystem import FileInfo, FilesystemManagerfrom .filesystem_watcher import (FilesystemEvent,FilesystemOperation,FilesystemWatcher,- SyncFilesystemWatcher,)-from .main import Session, SyncSession+from .main import Sessionfrom .process import (Process,ProcessManager,ProcessMessage,ProcessOutput,- SyncProcess,- SyncProcessManager,)-from .run_code import run_code, run_code_sync+from .run_code import run_codefrom .terminal import (Terminal,TerminalManager,TerminalOutput,- SyncTerminalManager,- SyncTerminal,)diff --git a/packages/python-sdk/e2b/session/code_snippet.py b/packages/python-sdk/e2b/session/code_snippet.pyindex e4b322c70..5c9d854e1 100644--- a/packages/python-sdk/e2b/session/code_snippet.py+++ b/packages/python-sdk/e2b/session/code_snippet.py@@ -25,9 +25,9 @@ class CodeSnippetManager(BaseModel):on_scan_ports: Optional[Callable[[List[OpenPort]], Any]] = None- async def _subscribe(self):+ def _subscribe(self):try:- await self.session._handle_subscriptions(+ self.session._handle_subscriptions(self.session._subscribe(self.service_name,lambda ports: self.on_scan_ports(diff --git a/packages/python-sdk/e2b/session/exception.py b/packages/python-sdk/e2b/session/exception.pyindex 400d047c6..7017625ce 100644--- a/packages/python-sdk/e2b/session/exception.py+++ b/packages/python-sdk/e2b/session/exception.py@@ -44,3 +44,7 @@ class AuthenticationException(SessionException):class UnsupportedRuntimeException(SessionException):pass+++class TimeoutException(SessionException):+ passdiff --git a/packages/python-sdk/e2b/session/filesystem.py b/packages/python-sdk/e2b/session/filesystem.pyindex 11299baa8..727395ec7 100644--- a/packages/python-sdk/e2b/session/filesystem.py+++ b/packages/python-sdk/e2b/session/filesystem.py@@ -1,13 +1,12 @@-import asyncioimport base64import logging-from typing import Any, List, Optional, Type, Union+from typing import Any, List, Optionalfrom pydantic import BaseModelfrom e2b.constants import TIMEOUTfrom e2b.session.exception import FilesystemException, RpcException-from e2b.session.filesystem_watcher import FilesystemWatcher, SyncFilesystemWatcher+from e2b.session.filesystem_watcher import FilesystemWatcherfrom e2b.session.session_connection import SessionConnectionfrom e2b.utils.filesystem import resolve_path@@ -23,8 +22,7 @@ class FileInfo(BaseModel):name: str-class BaseFilesystemManager:- _watcher_model = Union[Type[FilesystemWatcher], Type[SyncFilesystemWatcher]]+class FilesystemManager:_service_name = "filesystem"def __init__(self, session: SessionConnection):@@ -34,47 +32,51 @@ class BaseFilesystemManager:def cwd(self) -> str:return self._session.cwd- async def read_bytes(self, path: str) -> bytes:+ def read_bytes(self, path: str, timeout: Optional[float] = TIMEOUT) -> bytes:"""Reads the whole content of a file as a byte array.This can be used when you cannot represent the data as an UTF-8 string.:param path: path to a file+ :param timeout: timeout for the call:return: byte array representing the content of a file"""path = resolve_path(path, self.cwd)- result: str = await self._session._call(- self._service_name, "readBase64", [path]+ result: str = self._session._call(+ self._service_name, "readBase64", [path], timeout=timeout)return base64.b64decode(result)- async def write_bytes(self, path: str, content: bytes) -> None:+ def write_bytes(+ self, path: str, content: bytes, timeout: Optional[float] = TIMEOUT+ ) -> None:"""Writes content to a file as a byte array.This can be used when you cannot represent the data as an UTF-8 string.:param path: path to a file+ :param timeout: timeout for the call:param content: byte array representing the content to write"""path = resolve_path(path, self.cwd)base64_content = base64.b64encode(content).decode("utf-8")- await self._session._call(- self._service_name, "writeBase64", [path, base64_content]+ self._session._call(+ self._service_name, "writeBase64", [path, base64_content], timeout=timeout)- async def read(self, path: str, timeout: Optional[float] = TIMEOUT) -> str:+ def read(self, path: str, timeout: Optional[float] = TIMEOUT) -> str:"""Reads the whole content of a file as an array of bytes.:param path: Path to a file- :param timeout: Timeout for the call+ :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time:return: Content of a file"""logger.debug(f"Reading file {path}")path = resolve_path(path, self.cwd)try:- result: str = await self._session._call(+ result: str = self._session._call(self._service_name, "read", [path], timeout=timeout)logger.debug(f"Read file {path}")@@ -82,7 +84,7 @@ class BaseFilesystemManager:except RpcException as e:raise FilesystemException(e.message) from e- async def write(+ def write(self, path: str, content: str, timeout: Optional[float] = TIMEOUT) -> None:"""@@ -96,14 +98,14 @@ class BaseFilesystemManager:path = resolve_path(path, self.cwd)try:- await self._session._call(+ self._session._call(self._service_name, "write", [path, content], timeout=timeout)logger.debug(f"Wrote file {path}")except RpcException as e:raise FilesystemException(e.message) from e- async def remove(self, path: str, timeout: Optional[float] = TIMEOUT) -> None:+ def remove(self, path: str, timeout: Optional[float] = TIMEOUT) -> None:"""Removes a file or a directory.@@ -114,16 +116,12 @@ class BaseFilesystemManager:path = resolve_path(path, self.cwd)try:- await self._session._call(- self._service_name, "remove", [path], timeout=timeout- )+ self._session._call(self._service_name, "remove", [path], timeout=timeout)logger.debug(f"Removed file {path}")except RpcException as e:raise FilesystemException(e.message) from e- async def list(- self, path: str, timeout: Optional[float] = TIMEOUT- ) -> List[FileInfo]:+ def list(self, path: str, timeout: Optional[float] = TIMEOUT) -> List[FileInfo]:"""List files in a directory.@@ -136,7 +134,7 @@ class BaseFilesystemManager:path = resolve_path(path, self.cwd)try:- result: List[Any] = await self._session._call(+ result: List[Any] = self._session._call(self._service_name, "list", [path], timeout=timeout)logger.debug(f"Listed files in {path}, result: {result}")@@ -147,7 +145,7 @@ class BaseFilesystemManager:except RpcException as e:raise FilesystemException(e.message) from e- async def make_dir(self, path: str, timeout: Optional[float] = TIMEOUT) -> None:+ def make_dir(self, path: str, timeout: Optional[float] = TIMEOUT) -> None:"""Creates a new directory and all directories along the way if needed on the specified path.@@ -158,34 +156,12 @@ class BaseFilesystemManager:path = resolve_path(path, self.cwd)try:- await self._session._call(- self._service_name, "makeDir", [path], timeout=timeout- )+ self._session._call(self._service_name, "makeDir", [path], timeout=timeout)logger.debug(f"Created directory {path}")except RpcException as e:raise FilesystemException(e.message) from e- async def watch_dir(- self, path: str- ) -> Union[FilesystemWatcher, SyncFilesystemWatcher]:- logger.debug(f"Watching directory {path}")-- path = resolve_path(path, self.cwd)- return self._watcher_model(- connection=self._session,- path=path,- service_name=self._service_name,- )---class FilesystemManager(BaseFilesystemManager):- """- Filesystem manager is used to read, write, remove and list files and directories in the environment.- """-- _watcher_model = FilesystemWatcher-- async def watch_dir(self, path: str) -> FilesystemWatcher:+ def watch_dir(self, path: str) -> FilesystemWatcher:"""Watches directory for filesystem events.@@ -193,97 +169,11 @@ class FilesystemManager(BaseFilesystemManager)::return: New watcher"""- return await super().watch_dir(path)---class SyncFilesystemManager(BaseFilesystemManager):- """- Filesystem manager is used to read, write, remove and list files and directories in the environment.- """-- _watcher_model = SyncFilesystemWatcher-- def __init__(self, session: SessionConnection, loop: asyncio.AbstractEventLoop):- super().__init__(session)- self._loop = loop-- def read_bytes(self, path: str) -> bytes:- """- Reads the whole content of a file as a byte array.- This can be used when you cannot represent the data as an UTF-8 string.-- :param path: path to a file- :return: byte array representing the content of a file- """- return self._loop.run_until_complete(super().read_bytes(path))-- def write_bytes(self, path: str, content: bytes) -> None:- """- Writes content to a file as a byte array.- This can be used when you cannot represent the data as an UTF-8 string.-- :param path: path to a file- :param content: byte array representing the content to write- """- return self._loop.run_until_complete(super().write_bytes(path, content))-- def read(self, path: str, timeout: Optional[float] = TIMEOUT) -> str:- """- Reads the whole content of a file as an array of bytes.-- :param path: Path to a file- :param timeout: Timeout for the call- :return: Content of a file- """- return self._loop.run_until_complete(super().read(path, timeout))-- def write(- self, path: str, content: str, timeout: Optional[float] = TIMEOUT- ) -> None:- """- Writes content to a file.-- :param path: Path to a file- :param content: Content to write- :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time- """- return self._loop.run_until_complete(super().write(path, content, timeout))-- def remove(self, path: str, timeout: Optional[float] = TIMEOUT) -> None:- """- Removes a file or a directory.-- :param path: Path to a file or a directory- :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time- """- return self._loop.run_until_complete(super().remove(path, timeout))-- def list(self, path: str, timeout: Optional[float] = TIMEOUT) -> List[FileInfo]:- """- List files in a directory.-- :param path: Path to a directory- :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time-- :return: Array of files in a directory- """- return self._loop.run_until_complete(super().list(path, timeout))-- def make_dir(self, path: str, timeout: Optional[float] = TIMEOUT) -> None:- """- Creates a new directory and all directories along the way if needed on the specified path.-- :param path: Path to a new directory. For example '/dirA/dirB' when creating 'dirB'- :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time- """- return self._loop.run_until_complete(super().make_dir(path, timeout))-- def watch_dir(self, path: str) -> SyncFilesystemWatcher:- """- Watches directory for filesystem events.-- :param path: Path to a directory that will be watched+ logger.debug(f"Watching directory {path}")- :return: New watcher- """- return self._loop.run_until_complete(super().watch_dir(path))+ path = resolve_path(path, self.cwd)+ return FilesystemWatcher(+ connection=self._session,+ path=path,+ service_name=self._service_name,+ )diff --git a/packages/python-sdk/e2b/session/filesystem_watcher.py b/packages/python-sdk/e2b/session/filesystem_watcher.pyindex 513dacd7d..99a79005c 100644--- a/packages/python-sdk/e2b/session/filesystem_watcher.py+++ b/packages/python-sdk/e2b/session/filesystem_watcher.py@@ -1,6 +1,6 @@import loggingfrom enum import Enum-from typing import Any, Awaitable, Callable, Optional, Set+from typing import Any, Callable, Optional, Setfrom pydantic import BaseModel@@ -51,10 +51,10 @@ class FilesystemWatcher:self._connection = connectionself._path = pathself._service_name = service_name- self._unsubscribe: Optional[Callable[[], Awaitable[Any]]] = None+ self._unsubscribe: Optional[Callable[[], Any]] = Noneself._listeners: Set[Callable[[FilesystemEvent], Any]] = set()- async def start(self, timeout: Optional[float] = TIMEOUT) -> None:+ def start(self, timeout: Optional[float] = TIMEOUT) -> None:"""Starts the filesystem watcher.@@ -65,7 +65,7 @@ class FilesystemWatcher:logger.debug("Starting filesystem watcher for %s", self.path)try:- self._unsubscribe = await self._connection._subscribe(+ self._unsubscribe = self._connection._subscribe(self._service_name,self._handle_filesystem_events,"watchDir",@@ -76,7 +76,7 @@ class FilesystemWatcher:except RpcException as e:raise FilesystemException(e.message) from e- async def stop(self) -> None:+ def stop(self) -> None:"""Stops the filesystem watcher."""@@ -85,7 +85,7 @@ class FilesystemWatcher:self._listeners.clear()if self._unsubscribe:try:- await self._unsubscribe()+ self._unsubscribe()self._unsubscribe = Nonelogger.debug("Stopped filesystem watcher for %s", self.path)except RpcException as e:@@ -112,28 +112,3 @@ class FilesystemWatcher:event = FilesystemEvent(**event)for listener in self._listeners:listener(event)---class SyncFilesystemWatcher(FilesystemWatcher):- def __init__(- self,- connection: SessionConnection,- path: str,- service_name: str,- ):- super().__init__(connection, path, service_name)- self._loop = connection._loop-- def start(self, timeout: Optional[float] = TIMEOUT) -> None:- """- Starts the filesystem watcher.-- :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time- """- return self._loop.run_until_complete(super().start(timeout))-- def stop(self) -> None:- """- Stops the filesystem watcher.- """- return self._loop.run_until_complete(super().stop())diff --git a/packages/python-sdk/e2b/session/main.py b/packages/python-sdk/e2b/session/main.pyindex 91bcb6ded..1dc39b85a 100644--- a/packages/python-sdk/e2b/session/main.py+++ b/packages/python-sdk/e2b/session/main.py@@ -1,22 +1,17 @@-import asyncioimport loggingimport urllib.parsefrom os import pathfrom typing import Any, Callable, List, Literal, Optional, Union, IOimport requests-from async_timeout import timeout as async_timeout-from e2b.constants import (- TIMEOUT,- ENVD_PORT,-)+from e2b.constants import TIMEOUT, ENVD_PORTfrom e2b.session.code_snippet import CodeSnippetManager, OpenPortfrom e2b.session.env_vars import EnvVars-from e2b.session.filesystem import FilesystemManager, SyncFilesystemManager-from e2b.session.process import ProcessManager, SyncProcessManager+from e2b.session.filesystem import FilesystemManager+from e2b.session.process import ProcessManagerfrom e2b.session.session_connection import SessionConnection-from e2b.session.terminal import TerminalManager, SyncTerminalManager+from e2b.session.terminal import TerminalManagerlogger = logging.getLogger(__name__)@@ -70,13 +65,14 @@ class Session(SessionConnection):def __init__(self,id: Union[Environment, str],- api_key: Optional[str],+ api_key: Optional[str] = None,cwd: Optional[str] = None,env_vars: Optional[EnvVars] = None,on_scan_ports: Optional[Callable[[List[OpenPort]], Any]] = None,on_stdout: Optional[Callable[[str], Any]] = None,on_stderr: Optional[Callable[[str], Any]] = None,on_exit: Optional[Callable[[int], Any]] = None,+ timeout: Optional[float] = TIMEOUT,_debug_hostname: Optional[str] = None,_debug_port: Optional[int] = None,_debug_dev_env: Optional[Literal["remote", "local"]] = None,@@ -108,6 +104,15 @@ class Session(SessionConnection):if cwd and cwd.startswith("~"):cwd = cwd.replace("~", "/home/user")+ self._code_snippet = CodeSnippetManager(+ session=self,+ on_scan_ports=on_scan_ports,+ )+ self._terminal = TerminalManager(session=self)+ self._filesystem = FilesystemManager(session=self)+ self._process = ProcessManager(+ session=self, on_stdout=on_stdout, on_stderr=on_stderr, on_exit=on_exit+ )super().__init__(id=id,api_key=api_key,@@ -117,41 +122,32 @@ class Session(SessionConnection):_debug_port=_debug_port,_debug_dev_env=_debug_dev_env,on_close=self._close_services,- )- self._code_snippet = CodeSnippetManager(- session=self,- on_scan_ports=on_scan_ports,- )- self._terminal = TerminalManager(session=self)- self._filesystem = FilesystemManager(session=self)- self._process = ProcessManager(- session=self, on_stdout=on_stdout, on_stderr=on_stderr, on_exit=on_exit+ timeout=timeout,)- async def open(self, timeout: Optional[float] = TIMEOUT) -> None:+ def _open(self, timeout: Optional[float] = TIMEOUT) -> None:"""Opens the session.:param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time"""logger.info(f"Opening session {self._id}")- async with async_timeout(timeout):- await super().open()- await self._code_snippet._subscribe()+ super()._open(timeout=timeout)+ self._code_snippet._subscribe()logger.info(f"Session {self._id} opened")if self.cwd:- await self.filesystem.make_dir(self.cwd)+ self.filesystem.make_dir(self.cwd)def _close_services(self):self._terminal._close()self._process._close()- async def close(self) -> None:+ def close(self) -> None:"""Closes the session."""- await super().close()- await self._close()+ super().close()+ self._close()def file_url(self) -> str:"""@@ -164,31 +160,35 @@ class Session(SessionConnection):protocol = "http" if self._debug_dev_env == "local" else "https"return f"{protocol}://{ENVD_PORT}-{hostname}/file"- def upload_file(self, file: IO) -> str:+ def upload_file(self, file: IO, timeout: Optional[float] = TIMEOUT) -> str:"""Uploads a file to the session.The file will be uploaded to the user's home (`/home/user`) directory with the same name.If a file with the same name already exists, it will be overwritten.:param file: The file to upload+ :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time"""files = {"file": file}- r = requests.post(self.file_url(), files=files)+ r = requests.post(self.file_url(), files=files, timeout=timeout)if r.status_code != 200:raise Exception(f"Failed to upload file: {r.reason} {r.text}")filename = path.basename(file.name)return f"/home/user/{filename}"- def download_file(self, remote_path: str) -> bytes:+ def download_file(+ self, remote_path: str, timeout: Optional[float] = TIMEOUT+ ) -> bytes:"""Downloads a file from the session and returns it's content as bytes.:param remote_path: The path of the file to download+ :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time"""encoded_path = urllib.parse.quote(remote_path)url = f"{self.file_url()}?path={encoded_path}"- r = requests.get(url)+ r = requests.get(url, timeout=timeout)if r.status_code != 200:raise Exception(@@ -196,212 +196,8 @@ class Session(SessionConnection):)return r.content- async def __aenter__(self):- await self.open()- return self-- async def __aexit__(self, exc_type, exc_value, traceback):- await self.close()-- @classmethod- async def create(- cls,- id: Union[Environment, str],- api_key: Optional[str] = None,- cwd: Optional[str] = None,- env_vars: Optional[EnvVars] = None,- on_scan_ports: Optional[Callable[[List[OpenPort]], Any]] = None,- on_stdout: Optional[Callable[[str], Any]] = None,- on_stderr: Optional[Callable[[str], Any]] = None,- on_exit: Optional[Callable[[int], Any]] = None,- timeout: Optional[float] = TIMEOUT,- _debug_hostname: Optional[str] = None,- _debug_port: Optional[int] = None,- _debug_dev_env: Optional[Literal["remote", "local"]] = None,- ):- """- Creates a new cloud environment session.-- :param id: ID of the environment or the environment type template.- Can be one of the following environment type templates or a custom environment ID:- - `Nodejs`- - `Bash`- - `Python`- - `Java`- - `Go`- - `Rust`- - `PHP`- - `Perl`- - `DotNET`-- :param api_key: The API key to use- :param cwd: The current working directory to use- :param env_vars: Environment variables to set- :param on_scan_ports: A callback to handle opened ports- :param on_stdout: A default callback that is called when stdout with a newline is received from the process- :param on_stderr: A default callback that is called when stderr with a newline is received from the process- :param on_exit: A default callback that is called when the process exits- :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time- """- session = cls(- id=id,- api_key=api_key,- cwd=cwd,- env_vars=env_vars,- on_scan_ports=on_scan_ports,- on_stdout=on_stdout,- on_stderr=on_stderr,- on_exit=on_exit,- _debug_hostname=_debug_hostname,- _debug_port=_debug_port,- _debug_dev_env=_debug_dev_env,- )- await session.open(timeout=timeout)- return session---class SyncSession(Session):- """- E2B cloud environment gives your agent a full cloud development environment that's sandboxed. That means:-- - Access to Linux OS- - Using filesystem (create, list, and delete files and dirs)- - Run processes- - Sandboxed - you can run any code- - Access to the internet-- These cloud environments are meant to be used for agents. Like a sandboxed playgrounds, where the agent can do whatever it wants.- """-- def __init__(- self,- id: Union[Environment, str],- api_key: Optional[str],- cwd: Optional[str] = None,- env_vars: Optional[EnvVars] = None,- on_scan_ports: Optional[Callable[[List[OpenPort]], Any]] = None,- on_stdout: Optional[Callable[[str], Any]] = None,- on_stderr: Optional[Callable[[str], Any]] = None,- on_exit: Optional[Callable[[int], Any]] = None,- _debug_hostname: Optional[str] = None,- _debug_port: Optional[int] = None,- _debug_dev_env: Optional[Literal["remote", "local"]] = None,- ):- super().__init__(- id=id,- api_key=api_key,- cwd=cwd,- env_vars=env_vars,- on_scan_ports=on_scan_ports,- on_stdout=on_stdout,- on_stderr=on_stderr,- on_exit=on_exit,- _debug_hostname=_debug_hostname,- _debug_port=_debug_port,- _debug_dev_env=_debug_dev_env,- )- self._loop = asyncio.get_event_loop()- asyncio.set_event_loop(self._loop)- self._process = SyncProcessManager(self, self._loop)- self._filesystem = SyncFilesystemManager(self, self._loop)- self._terminal = SyncTerminalManager(self, self._loop)-- @property- def process(self) -> SyncProcessManager:- """- Process manager used to run commands.- """- return self._process-- @property- def terminal(self) -> SyncTerminalManager:- """- Terminal manager used to create interactive terminals.- """- return self._terminal-- @property- def filesystem(self) -> SyncFilesystemManager:- """- Filesystem manager used to manage files.- """- return self._filesystem-- def open(self, timeout: Optional[float] = TIMEOUT):- """- Opens the session.- """- return self._loop.run_until_complete(super().open(timeout))-- def _close_services(self):- self._terminal._close()- self._process._close()-- def close(self) -> None:- """- Closes the session.- """- self._loop.run_until_complete(super().close())-- def __enter__(self, timeout: Optional[float] = TIMEOUT):- self.open(timeout)+ def __enter__(self):return selfdef __exit__(self, exc_type, exc_value, traceback):self.close()-- @classmethod- def create(- cls,- id: Union[Environment, str],- api_key: Optional[str] = None,- cwd: Optional[str] = None,- env_vars: Optional[EnvVars] = None,- on_scan_ports: Optional[Callable[[List[OpenPort]], Any]] = None,- on_stdout: Optional[Callable[[str], Any]] = None,- on_stderr: Optional[Callable[[str], Any]] = None,- on_exit: Optional[Callable[[int], Any]] = None,- timeout: Optional[float] = TIMEOUT,- _debug_hostname: Optional[str] = None,- _debug_port: Optional[int] = None,- _debug_dev_env: Optional[Literal["remote", "local"]] = None,- ):- """- Creates a new cloud environment session.-- :param id: ID of the environment or the environment type template.- Can be one of the following environment type templates or a custom environment ID:- - `Nodejs`- - `Bash`- - `Python`- - `Java`- - `Go`- - `Rust`- - `PHP`- - `Perl`- - `DotNET`-- :param api_key: The API key to use- :param cwd: The current working directory to use- :param env_vars: Environment variables to set- :param on_scan_ports: A callback to handle opened ports- :param on_stdout: A default callback that is called when stdout with a newline is received from the process- :param on_stderr: A default callback that is called when stderr with a newline is received from the process- :param on_exit: A default callback that is called when the process exits- :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time- """- session = cls(- id=id,- api_key=api_key,- cwd=cwd,- env_vars=env_vars,- on_scan_ports=on_scan_ports,- on_stdout=on_stdout,- on_stderr=on_stderr,- on_exit=on_exit,- _debug_hostname=_debug_hostname,- _debug_port=_debug_port,- _debug_dev_env=_debug_dev_env,- )- session.open(timeout=timeout)- return sessiondiff --git a/packages/python-sdk/e2b/session/process.py b/packages/python-sdk/e2b/session/process.pyindex 3b5cb5732..e402ab0af 100644--- a/packages/python-sdk/e2b/session/process.py+++ b/packages/python-sdk/e2b/session/process.py@@ -1,22 +1,16 @@-import asyncioimport loggingimport warnings-from abc import ABCfrom asyncio.exceptions import TimeoutError+from concurrent.futures import ThreadPoolExecutorfrom typing import (Any,- Awaitable,Callable,ClassVar,- Coroutine,Dict,List,Optional,- Union,- Type,)-import async_timeoutfrom pydantic import BaseModelfrom e2b.constants import TIMEOUT@@ -26,6 +20,7 @@ from e2b.session.out import OutStderrResponse, OutStdoutResponsefrom e2b.session.session_connection import SessionConnectionfrom e2b.utils.future import DeferredFuturefrom e2b.utils.id import create_id+from e2b.utils.threads import shutdown_executorlogger = logging.getLogger(__name__)@@ -95,8 +90,8 @@ class Process:self,process_id: str,session: SessionConnection,- trigger_exit: Callable[[], Coroutine[Any, Any, None]],- finished: Awaitable[ProcessOutput],+ trigger_exit: Callable[[], Any],+ finished: DeferredFuture[ProcessOutput],output: ProcessOutput,):self._process_id = process_id@@ -164,22 +159,13 @@ class Process:"""return self._process_id- def __await__(self):- """- Deprecated, use wait instead.- """- warnings.warn(- "Use wait instead of just calling await on Process", DeprecationWarning- )- return self._finished.__await__()-- async def wait(self):+ def wait(self):"""Waits for the process to exit."""- return await self._finished+ return self._finished.result()- async def send_stdin(self, data: str, timeout: Optional[float] = TIMEOUT) -> None:+ def send_stdin(self, data: str, timeout: Optional[float] = TIMEOUT) -> None:"""Sends data to the process stdin.@@ -187,7 +173,7 @@ class Process::param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time"""try:- await self._session._call(+ self._session._call(ProcessManager._service_name,"stdin",[self.process_id, data],@@ -203,50 +189,20 @@ class Process::param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time"""try:- await self._session._call(+ self._session._call(ProcessManager._service_name, "kill", [self.process_id], timeout=timeout)except RpcException as e:raise ProcessException(e.message) from e- await self._trigger_exit()---class SyncProcess(Process):- @property- def _loop(self):- return self._session._loop-- def wait(self):- """- Waits for the process to exit.- """- return self._loop.run_until_complete(super().wait())-- def send_stdin(self, data: str, timeout: Optional[float] = TIMEOUT) -> None:- """- Sends data to the process stdin.-- :param data: Data to send- :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time- """- return self._loop.run_until_complete(super().send_stdin(data, timeout))-- def kill(self, timeout: Optional[float] = TIMEOUT) -> None:- """- Kills the process.-- :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time- """- return self._loop.run_until_complete(super().kill(timeout))+ self._trigger_exit()-class BaseProcessManager(ABC):+class ProcessManager:"""Manager for starting and interacting with processes in the environment."""_service_name = "process"- _process_model: Union[Type[Process], Type[SyncProcess]]def __init__(self,@@ -267,7 +223,7 @@ class BaseProcessManager(ABC):self._process_cleanup.clear()- async def start(+ def start(self,cmd: str,on_stdout: Optional[Callable[[ProcessMessage], Any]] = None,@@ -278,248 +234,143 @@ class BaseProcessManager(ABC):rootdir: str = "", # DEPRECATEDprocess_id: Optional[str] = None,timeout: Optional[float] = TIMEOUT,- ) -> Union[Process, SyncProcess]:+ ) -> Process:logger.info(f"Starting process (id: {process_id}): {cmd}")- async with async_timeout.timeout(timeout):- env_vars = env_vars or {}- env_vars = {**self._session.env_vars, **env_vars}-- on_stdout = on_stdout or self._on_stdout- on_stderr = on_stderr or self._on_stderr- on_exit = on_exit or self._on_exit-- future_exit = DeferredFuture(self._process_cleanup)- process_id = process_id or create_id(12)-- unsub_all: Optional[Callable[[], Awaitable[Any]]] = None-- output = ProcessOutput()-- def handle_exit(exit_code: int):- output.exit_code = exit_code- future_exit(True)-- def handle_stdout(data: Dict[Any, Any]):- out = OutStdoutResponse(**data)-- message = ProcessMessage(- line=out.line,- timestamp=out.timestamp,- error=False,- )-- output._add_stdout(message)- if on_stdout:- try:- on_stdout(message)- except TypeError as error:- logger.exception(f"Error in on_stdout callback: {error}")-- def handle_stderr(data: Dict[Any, Any]):- out = OutStderrResponse(**data)-- message = ProcessMessage(- line=out.line,- timestamp=out.timestamp,- error=True,- )-- output._add_stderr(message)- if on_stderr:- try:- on_stderr(message)- except TypeError as error:- logger.exception(f"Error in on_stdout callback: {error}")-- try:- unsub_all = await self._session._handle_subscriptions(- self._session._subscribe(- self._service_name, handle_exit, "onExit", process_id- ),- self._session._subscribe(- self._service_name, handle_stdout, "onStdout", process_id- ),- self._session._subscribe(- self._service_name, handle_stderr, "onStderr", process_id- ),- )- except (RpcException, MultipleExceptions) as e:- future_exit.cancel()-- if isinstance(e, RpcException):- raise ProcessException(e.message) from e- elif isinstance(e, MultipleExceptions):- raise ProcessException(- "Failed to subscribe to RPC services necessary for starting process"- ) from e-- future_exit_handler_finish = DeferredFuture[ProcessOutput](- self._process_cleanup- )+ env_vars = env_vars or {}+ env_vars = {**self._session.env_vars, **env_vars}- async def exit_handler():- await future_exit- logger.info(- f"Handling process exit (id: {process_id})",- )- if unsub_all:- await unsub_all()- if on_exit:- try:- on_exit()- except TypeError as error:- logger.exception(f"Error in on_exit callback: {error}")- future_exit_handler_finish(output)-- exit_task = asyncio.create_task(exit_handler())- self._process_cleanup.append(exit_task.cancel)-- async def trigger_exit():- logger.info(f"Exiting the process (id: {process_id})")- future_exit(None)- await future_exit_handler_finish- logger.debug(f"Exited the process (id: {process_id})")-- try:- if not cwd and rootdir:- cwd = rootdir- logger.warning(- "The rootdir parameter is deprecated, use cwd instead."- )-- if not cwd and self._session.cwd:- cwd = self._session.cwd-- await self._session._call(- self._service_name,- "start",- [- process_id,- cmd,- env_vars,- cwd,- ],- )- logger.info(f"Started process (id: {process_id})")- return self._process_model(- output=output,- session=self._session,- process_id=process_id,- trigger_exit=trigger_exit,- finished=future_exit_handler_finish,- )- except RpcException as e:- await trigger_exit()- raise ProcessException(e.message) from e- except TimeoutError as e:- logger.error(f"Timeout error during starting the process: {cmd}")- await trigger_exit()- raise e+ on_stdout = on_stdout or self._on_stdout+ on_stderr = on_stderr or self._on_stderr+ on_exit = on_exit or self._on_exit+ future_exit = DeferredFuture(self._process_cleanup)+ process_id = process_id or create_id(12)-class ProcessManager(BaseProcessManager):- _process_model = Process+ unsub_all: Optional[Callable] = None- async def start(- self,- cmd: str,- on_stdout: Optional[Callable[[ProcessMessage], Any]] = None,- on_stderr: Optional[Callable[[ProcessMessage], Any]] = None,- on_exit: Optional[Callable[[], Any]] = None,- env_vars: Optional[EnvVars] = None,- cwd: str = "",- rootdir: str = "", # DEPRECATED- process_id: Optional[str] = None,- timeout: Optional[float] = TIMEOUT,- ) -> Process:- """- Starts a process in the environment.-- :param cmd: The command to run- :param on_stdout: A callback that is called when stdout with a newline is received from the process- :param on_stderr: A callback that is called when stderr with a newline is received from the process- :param on_exit: A callback that is called when the process exits- :param env_vars: A dictionary of environment variables to set for the process- :param cwd: The root directory for the process- :param rootdir: (DEPRECATED - use cwd) The root directory for the process- .. deprecated:: 0.3.2- Use cwd instead.- :param process_id: The process id to use for the process. If not provided, a random id is generated- :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time+ output = ProcessOutput()- :return: A process object- """- return await super().start(- cmd=cmd,- on_stdout=on_stdout,- on_stderr=on_stderr,- on_exit=on_exit,- env_vars=env_vars,- cwd=cwd,- rootdir=rootdir,- process_id=process_id,- timeout=timeout,- )+ def handle_exit(exit_code: int):+ output.exit_code = exit_code+ future_exit(True)+ def handle_stdout(data: Dict[Any, Any]):+ out = OutStdoutResponse(**data)-class SyncProcessManager(BaseProcessManager):- _process_model = SyncProcess+ message = ProcessMessage(+ line=out.line,+ timestamp=out.timestamp,+ error=False,+ )- def __init__(- self,- session: SessionConnection,- loop: asyncio.AbstractEventLoop,- on_stdout: Optional[Callable[[ProcessMessage], Any]] = None,- on_stderr: Optional[Callable[[ProcessMessage], Any]] = None,- on_exit: Optional[Callable[[], Any]] = None,- ):- super().__init__(- session=session,- on_stdout=on_stdout,- on_stderr=on_stderr,- on_exit=on_exit,+ output._add_stdout(message)+ if on_stdout:+ try:+ on_stdout(message)+ except TypeError as error:+ logger.exception(f"Error in on_stdout callback: {error}")++ def handle_stderr(data: Dict[Any, Any]):+ out = OutStderrResponse(**data)++ message = ProcessMessage(+ line=out.line,+ timestamp=out.timestamp,+ error=True,+ )++ output._add_stderr(message)+ if on_stderr:+ try:+ on_stderr(message)+ except TypeError as error:+ logger.exception(f"Error in on_stdout callback: {error}")++ try:+ unsub_all = self._session._handle_subscriptions(+ self._session._subscribe(+ self._service_name, handle_exit, "onExit", process_id+ ),+ self._session._subscribe(+ self._service_name, handle_stdout, "onStdout", process_id+ ),+ self._session._subscribe(+ self._service_name, handle_stderr, "onStderr", process_id+ ),+ )+ except (RpcException, MultipleExceptions) as e:+ future_exit.cancel()++ if isinstance(e, RpcException):+ raise ProcessException(e.message) from e+ elif isinstance(e, MultipleExceptions):+ raise ProcessException(+ "Failed to subscribe to RPC services necessary for starting process"+ ) from e++ future_exit_handler_finish = DeferredFuture[ProcessOutput](+ self._process_cleanup)- self._loop = loop- def start(- self,- cmd: str,- on_stdout: Optional[Callable[[ProcessMessage], Any]] = None,- on_stderr: Optional[Callable[[ProcessMessage], Any]] = None,- on_exit: Optional[Callable[[], Any]] = None,- env_vars: Optional[EnvVars] = None,- cwd: str = "",- rootdir: str = "", # DEPRECATED- process_id: Optional[str] = None,- timeout: Optional[float] = TIMEOUT,- ) -> SyncProcess:- """- Starts a process in the environment.-- :param cmd: The command to run- :param on_stdout: A callback that is called when stdout with a newline is received from the process- :param on_stderr: A callback that is called when stderr with a newline is received from the process- :param on_exit: A callback that is called when the process exits- :param env_vars: A dictionary of environment variables to set for the process- :param cwd: The root directory for the process- :param rootdir: (DEPRECATED - use cwd) The root directory for the process- .. deprecated:: 0.3.2- Use cwd instead.- :param process_id: The process id to use for the process. If not provided, a random id is generated- :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time+ def exit_handler():+ future_exit.result()+ logger.error("Process exit handler started")+ logger.info(+ f"Handling process exit (id: {process_id})",+ )+ if unsub_all:+ unsub_all()+ if on_exit:+ try:+ on_exit()+ except TypeError as error:+ logger.exception(f"Error in on_exit callback: {error}")+ future_exit_handler_finish(output)++ executor = ThreadPoolExecutor(thread_name_prefix="e2b-process-exit-handler")+ exit_task = executor.submit(exit_handler)++ self._process_cleanup.append(exit_task.cancel)+ self._process_cleanup.append(lambda: shutdown_executor(executor))++ def trigger_exit():+ logger.info(f"Exiting the process (id: {process_id})")+ logger.error("Process exit handler triggered")+ future_exit(None)+ future_exit_handler_finish.result()+ logger.debug(f"Exited the process (id: {process_id})")- :return: A process object- """- return self._loop.run_until_complete(- super().start(- cmd=cmd,- on_stdout=on_stdout,- on_stderr=on_stderr,- on_exit=on_exit,- env_vars=env_vars,- cwd=cwd,- rootdir=rootdir,- process_id=process_id,+ try:+ if not cwd and rootdir:+ cwd = rootdir+ logger.warning("The rootdir parameter is deprecated, use cwd instead.")++ if not cwd and self._session.cwd:+ cwd = self._session.cwd++ self._session._call(+ self._service_name,+ "start",+ [+ process_id,+ cmd,+ env_vars,+ cwd,+ ],timeout=timeout,)- )+ logger.info(f"Started process (id: {process_id})")+ return Process(+ output=output,+ session=self._session,+ process_id=process_id,+ trigger_exit=trigger_exit,+ finished=future_exit_handler_finish,+ )+ except RpcException as e:+ trigger_exit()+ raise ProcessException(e.message) from e+ except TimeoutError as e:+ logger.error(f"Timeout error during starting the process: {cmd}")+ trigger_exit()+ raise ediff --git a/packages/python-sdk/e2b/session/run_code.py b/packages/python-sdk/e2b/session/run_code.pyindex 740c46989..45d07ca3c 100644--- a/packages/python-sdk/e2b/session/run_code.py+++ b/packages/python-sdk/e2b/session/run_code.py@@ -1,4 +1,3 @@-import asynciofrom os import getenvfrom typing import Literal, Union, Optional@@ -20,7 +19,7 @@ CodeRuntime = Literal[]-async def run_code(+def run_code(runtime: Union[CodeRuntime, str],code: str,api_key: Optional[str] = None,@@ -62,38 +61,12 @@ async def run_code(f'Invalid runtime "{runtime}". Please contact us ([email protected]) if you need support for this runtime')- session = await Session.create(- id=env_id,- api_key=api_key,- )- await session.filesystem.write(filepath, code)+ session = Session(id=env_id, api_key=api_key)+ session.filesystem.write(filepath, code)- proc = await session.process.start(- cmd=f"{binary} {filepath}",- )- await proc+ proc = session.process.start(cmd=f"{binary} {filepath}")+ proc.wait()- await session.close()+ session.close()return proc.output.stdout, proc.output.stderr---def run_code_sync(- runtime: Union[CodeRuntime, str],- code: str,- api_key: Optional[str] = None,-):- """- Runs code in a sandboxed cloud playground and return the stdout and stderr- `run_ode` wraps the `Session` class and provides a simple interface for running code in a sandboxed environment- without any need to manage lifecycle of the session.- `run_code` automatically loads the E2B API key from the `E2B_API_KEY` environment variable.-- :param runtime: The runtime to run the code in. One of "Node16" or "Python3".- :param code: The code to run- :param api_key: The E2B API key to use. If not provided, the `E2B_API_KEY` environment variable is used.-- :return: A string touple of stdout and stderr- """- loop = asyncio.get_event_loop()- return loop.run_until_complete(run_code(runtime, code, api_key))diff --git a/packages/python-sdk/e2b/session/session_connection.py b/packages/python-sdk/e2b/session/session_connection.pyindex 1ca75a62f..e444171f3 100644--- a/packages/python-sdk/e2b/session/session_connection.py+++ b/packages/python-sdk/e2b/session/session_connection.py@@ -1,12 +1,14 @@import asyncio+import functoolsimport loggingimport traceback-from concurrent.futures import ThreadPoolExecutor+from concurrent.futures import ThreadPoolExecutor, TimeoutErrorfrom os import getenv-from typing import Any, Awaitable, Callable, List, Literal, Optional, Union+from time import sleep+from typing import Any, Callable, List, Literal, Optional, Union-import async_timeoutfrom pydantic import BaseModel+from urllib3.exceptions import ReadTimeoutErrorfrom e2b.api import client, configuration, exceptions, modelsfrom e2b.constants import (@@ -21,10 +23,10 @@ from e2b.session.exception import (AuthenticationException,MultipleExceptions,SessionException,+ TimeoutException,)from e2b.session.session_rpc import Notification, SessionRpc-from e2b.utils.future import DeferredFuture, run_async_func_in_new_loop-from e2b.utils.noop import noop+from e2b.utils.future import DeferredFuturefrom e2b.utils.str import camel_case_to_snake_casefrom e2b.utils.threads import shutdown_executor@@ -34,7 +36,7 @@ logger = logging.getLogger(__name__)class Subscription(BaseModel):service: strid: str- handler: Callable[[Any], Awaitable[None]]+ handler: Callable[[Any], None]class SessionConnection:@@ -60,10 +62,11 @@ class SessionConnection:api_key: Optional[str],cwd: Optional[str] = None,env_vars: Optional[EnvVars] = None,+ on_close: Optional[Callable[[], Any]] = None,+ timeout: Optional[float] = TIMEOUT,_debug_hostname: Optional[str] = None,_debug_port: Optional[int] = None,_debug_dev_env: Optional[Literal["remote", "local"]] = None,- on_close: Optional[Callable[[], Any]] = None,):api_key = api_key or getenv("E2B_API_KEY")@@ -91,6 +94,8 @@ class SessionConnection:logger.info(f"Session for code snippet {self._id} initialized")+ self._open(timeout=timeout)+def get_hostname(self, port: Optional[int] = None):"""Get the hostname for the session or for the specified session's port.@@ -119,21 +124,21 @@ class SessionConnection:return f"{port}-{hostname}"return hostname- async def close(self) -> None:+ def close(self) -> None:"""Close the session and unsubscribe from all the subscriptions."""- await self._close()+ self._close()logger.info(f"Session closed")- async def _close(self):+ def _close(self):if self._is_open and self._session:logger.info(f"Closing session {self._session.code_snippet_id} (id: {self._session.session_id})")self._is_open = Falseif self._rpc:- await self._rpc.close()+ self._rpc.close()if self._on_close_child:self._on_close_child()@@ -144,7 +149,7 @@ class SessionConnection:cleanup()self._process_cleanup.clear()- async def open(self) -> None:+ def _open(self, timeout: Optional[float] = TIMEOUT) -> None:"""Open a connection to a new session.@@ -156,49 +161,36 @@ class SessionConnection:self._is_open = Truetry:- async with client.ApiClient(configuration) as api_client:+ with client.ApiClient(configuration) as api_client:api = client.SessionsApi(api_client)- self._session = await api.sessions_post(+ self._session = api.sessions_post(models.NewSession(codeSnippetID=self._id, editEnabled=False),api_key=self._api_key,+ _request_timeout=timeout,)logger.info(f"Session {self._session.code_snippet_id} created (id:{self._session.session_id})")# We could potentially use asyncio.to_thread() but that requires Python 3.9+- executor = ThreadPoolExecutor()- self._refreshing_task = asyncio.get_running_loop().run_in_executor(- executor,- run_async_func_in_new_loop,- self._refresh(self._session.session_id),+ executor = ThreadPoolExecutor(thread_name_prefix="e2b-refresh")+ self._refreshing_task = executor.submit(+ self._refresh, self._session.session_id)self._process_cleanup.append(self._refreshing_task.cancel)self._process_cleanup.append(lambda: shutdown_executor(executor))- async def refresh_cleanup():- try:- if self._refreshing_task:- await self._refreshing_task- finally:- if self._session:- logger.info(- f"Stopped refreshing session (id: {self._session.session_id})"- )- else:- logger.info(- "No session to stop refreshing. Session was not created"- )-- await self._close()-- refresh_handler = asyncio.create_task(refresh_cleanup())- self._process_cleanup.append(refresh_handler.cancel)+ except ReadTimeoutError as e:+ logger.error(f"Failed to acquire session: {e}")+ self._close()+ raise TimeoutException(+ f"Failed to acquire session: {e}",+ ) from eexcept Exception as e:logger.error(f"Failed to acquire session")- await self._close()+ self._close()raise ehostname = self.get_hostname(self._debug_port or ENVD_PORT)@@ -211,52 +203,50 @@ class SessionConnection:url=session_url,on_message=self._handle_notification,)- await self._rpc.connect()+ self._rpc.connect()+ except TimeoutError as e:+ print(e)+ raise eexcept Exception as e:- await self._close()+ print(e)+ self._close()raise e- async def _call(+ def _call(self,service: str,method: str,params: List[Any] = None,timeout: Optional[float] = TIMEOUT,- ):+ ) -> Any:if not params:params = []if not self.is_open:raise SessionException("Session is not open")- async with async_timeout.timeout(timeout):- return await self._rpc.send_message(f"{service}_{method}", params)+ return self._rpc.send_message(f"{service}_{method}", params, timeout=timeout)- async def _handle_subscriptions(+ def _handle_subscriptions(self,- *subs: Optional[Awaitable[Callable[[], Awaitable[None]]]],+ *subs: Optional[Callable[[], None]],):- results: List[- Union[Callable[[], Awaitable[None]], None, Exception]- ] = await asyncio.gather(- *[sub if sub else noop() for sub in subs],- return_exceptions=True,- )+ results: List[Union[Callable, None, Exception]] = [sub for sub in subs if sub]exceptions = [e for e in results if isinstance(e, Exception)]- async def unsub_all():- return await asyncio.gather(- *[- unsub()+ def unsub_all():+ return lambda: functools.reduce(+ lambda _, f: f(),+ [+ unsubfor unsub in resultsif not isinstance(unsub, Exception) and unsub],- return_exceptions=True,)if len(exceptions) > 0:- await unsub_all()+ unsub_all()if len(exceptions) == 1:raise exceptions[0]@@ -275,23 +265,21 @@ class SessionConnection:return unsub_all- async def _unsubscribe(self, sub_id: str, timeout: Optional[float] = TIMEOUT):+ def _unsubscribe(self, sub_id: str, timeout: Optional[float] = TIMEOUT):sub = self._subscribers[sub_id]- await self._call(sub.service, "unsubscribe", [sub.id], timeout=timeout)+ self._call(sub.service, "unsubscribe", [sub.id], timeout=timeout)del self._subscribers[sub_id]logger.debug(f"Unsubscribed (sub_id: {sub_id})")- async def _subscribe(+ def _subscribe(self,service: str,handler: Callable[[Any], Any],method: str,*params,timeout: Optional[float] = TIMEOUT,- ):- sub_id = await self._call(- service, "subscribe", [method, *params], timeout=timeout- )+ ) -> Callable[[], None]:+ sub_id = self._call(service, "subscribe", [method, *params], timeout=timeout)if not isinstance(sub_id, str):raise Exception(f"Failed to subscribe: {camel_case_to_snake_case(method)}")@@ -300,8 +288,8 @@ class SessionConnection:)logger.info(f"Subscribed to {service} {camel_case_to_snake_case(method)}")- async def unsub():- await self._unsubscribe(sub_id, timeout=timeout)+ def unsub():+ self._unsubscribe(sub_id, timeout=timeout)return unsub@@ -312,38 +300,48 @@ class SessionConnection:if id == data.params["subscription"]:sub.handler(data.params["result"])- async def _refresh(self, session_id: str):- logger.info(- f"Started refreshing session {self._session.code_snippet_id} (id: {session_id})"- )+ def _refresh(self, session_id: str):+ try:+ logger.info(+ f"Started refreshing session {self._session.code_snippet_id} (id: {session_id})"+ )++ current_retry = 0- current_retry = 0-- async with client.ApiClient(configuration) as api_client:- api = client.SessionsApi(api_client)- while True:- if not self._is_open:- logger.debug(- f"Cannot refresh session - it was closed. {self._session}"- )- return- await asyncio.sleep(SESSION_REFRESH_PERIOD)- try:- await api.sessions_session_id_refresh_post(session_id)- logger.debug(f"Refreshed session {session_id}")- except exceptions.ApiException as e:- if e.status == 404:- raise SessionException(- f"Session {session_id} failed because it cannot be found"- ) from e- else:- if current_retry < self._refresh_retries:- logger.error(- f"Refreshing session {session_id} failed. Retrying..."- )- current_retry += 1+ with client.ApiClient(configuration) as api_client:+ api = client.SessionsApi(api_client)+ while True:+ if not self._is_open:+ logger.debug(+ f"Cannot refresh session - it was closed. {self._session}"+ )+ return+ sleep(SESSION_REFRESH_PERIOD)+ try:+ api.sessions_session_id_refresh_post(session_id)+ logger.debug(f"Refreshed session {session_id}")+ except exceptions.ApiException as e:+ if e.status == 404:+ raise SessionException(+ f"Session {session_id} failed because it cannot be found"+ ) from eelse:- logger.error(- f"Refreshing session {session_id} failed. Max retries exceeded"- )- raise e+ if current_retry < self._refresh_retries:+ logger.error(+ f"Refreshing session {session_id} failed. Retrying..."+ )+ current_retry += 1+ else:+ logger.error(+ f"Refreshing session {session_id} failed. Max retries exceeded"+ )+ raise e+ finally:+ if self._session:+ logger.info(+ f"Stopped refreshing session (id: {self._session.session_id})"+ )+ else:+ logger.info("No session to stop refreshing. Session was not created")++ self._close()diff --git a/packages/python-sdk/e2b/session/session_rpc.py b/packages/python-sdk/e2b/session/session_rpc.pyindex ca80ea4a7..f281d5589 100644--- a/packages/python-sdk/e2b/session/session_rpc.py+++ b/packages/python-sdk/e2b/session/session_rpc.py@@ -1,26 +1,26 @@from __future__ import annotations-import asyncioimport jsonimport logging-from concurrent.futures import ThreadPoolExecutor+from concurrent.futures import ThreadPoolExecutor, TimeoutErrorfrom queue import Queuefrom threading import Eventfrom typing import Any, Callable, Dict, Iterator, List, Union-from janus import Queue as JanusQueuefrom jsonrpcclient import Error, Ok, request_jsonfrom jsonrpcclient.id_generators import decimal as decimal_id_generatorfrom jsonrpcclient.responses import Responsefrom pydantic import BaseModel, PrivateAttr, ConfigDictfrom websockets.typing import Data-from e2b.session.exception import RpcException+from e2b.constants import TIMEOUT+from e2b.session.exception import RpcException, TimeoutExceptionfrom e2b.session.websocket_client import WebSocketfrom e2b.utils.future import DeferredFuture, run_async_func_in_new_loopfrom e2b.utils.threads import shutdown_executorlogger = logging.getLogger(__name__)+STOP_SIGN = object()class Notification(BaseModel):@@ -60,41 +60,52 @@ class SessionRpc(BaseModel):_id_generator: Iterator[int] = PrivateAttr(default_factory=decimal_id_generator)_waiting_for_replies: Dict[int, DeferredFuture] = PrivateAttr(default_factory=dict)_queue_in: Queue = PrivateAttr(default_factory=Queue)- _queue_out: JanusQueue = PrivateAttr(default_factory=JanusQueue)+ _queue_out: Queue = PrivateAttr(default_factory=Queue)_process_cleanup: List[Callable[[], Any]] = PrivateAttr(default_factory=list)- async def process_messages(self):+ def process_messages(self):while True:- data = await self._queue_out.async_q.get()+ data = self._queue_out.get()+ if data == STOP_SIGN:+ breaklogger.debug(f"WebSocket received message: {data}".strip())- await self._receive_message(data)- self._queue_out.async_q.task_done()+ self._receive_message(data)+ self._queue_out.task_done()- async def connect(self):+ def connect(self):started = Event()stopped = Event()- task = asyncio.create_task(self.process_messages())- executor = ThreadPoolExecutor()+ self._process_cleanup.append(stopped.set)++ messages_executor = ThreadPoolExecutor(+ thread_name_prefix="e2b-process-messages"+ )+ task = messages_executor.submit(self.process_messages)+ self._process_cleanup.append(lambda: self._queue_out.put(STOP_SIGN))+ self._process_cleanup.append(task.cancel)+ self._process_cleanup.append(lambda: shutdown_executor(messages_executor))++ executor = ThreadPoolExecutor(thread_name_prefix="e2b-websocket")websocket_task = executor.submit(run_async_func_in_new_loop,WebSocket(url=self.url,queue_in=self._queue_in,- queue_out=self._queue_out.sync_q,+ queue_out=self._queue_out,started=started,stopped=stopped,).run(),)- self._process_cleanup.append(stopped.set)self._process_cleanup.append(websocket_task.cancel)self._process_cleanup.append(lambda: shutdown_executor(executor))- self._process_cleanup.append(task.cancel)+logger.info("WebSocket waiting to start")- while not started.is_set():- await asyncio.sleep(0)+ started.wait()logger.info("WebSocket started")- async def send_message(self, method: str, params: List[Any]) -> Any:+ def send_message(+ self, method: str, params: List[Any], timeout: float = TIMEOUT+ ) -> Any:id = next(self._id_generator)request = request_json(method, params, id)future_reply = DeferredFuture(self._process_cleanup)@@ -104,7 +115,13 @@ class SessionRpc(BaseModel):logger.debug(f"WebSocket queueing message: {request}")self._queue_in.put(request)logger.debug(f"WebSocket waiting for reply: {request}")- r = await future_reply+ try:+ r = future_reply.result(timeout=timeout)+ except TimeoutError as e:+ logger.error(f"WebSocket timed out while waiting for: {request} {e}")+ raise TimeoutException(+ f"WebSocket timed out while waiting for: {request} {e}"+ )return rexcept Exception as e:logger.error(f"WebSocket received error while waiting for: {request} {e}")@@ -113,7 +130,7 @@ class SessionRpc(BaseModel):del self._waiting_for_replies[id]logger.debug(f"WebSocket removed waiting handler for {id}")- async def _receive_message(self, data: Data):+ def _receive_message(self, data: Data):logger.debug(f"Processing message: {data}".strip())message = to_response_or_notification(json.loads(data))@@ -156,5 +173,5 @@ class SessionRpc(BaseModel):handler.cancel()del handler- async def close(self):+ def close(self):self._close()diff --git a/packages/python-sdk/e2b/session/terminal.py b/packages/python-sdk/e2b/session/terminal.pyindex 1d18a2e67..bb0556f27 100644--- a/packages/python-sdk/e2b/session/terminal.py+++ b/packages/python-sdk/e2b/session/terminal.py@@ -1,10 +1,7 @@-import asyncioimport logging-import warnings-from abc import ABC-from typing import Any, Awaitable, Callable, Coroutine, List, Optional, Union, Type+from concurrent.futures import ThreadPoolExecutor+from typing import Any, Callable, List, Optional-import async_timeoutfrom pydantic import BaseModelfrom e2b.constants import TIMEOUT@@ -13,6 +10,7 @@ from e2b.session.exception import MultipleExceptions, RpcException, TerminalExcefrom e2b.session.session_connection import SessionConnectionfrom e2b.utils.future import DeferredFuturefrom e2b.utils.id import create_id+from e2b.utils.threads import shutdown_executorlogger = logging.getLogger(__file__)@@ -57,24 +55,18 @@ class Terminal:"""return self._terminal_id- def __await__(self):- warnings.warn(- """'await terminal' is deprecated, use 'await terminal.wait()' instead"""- )- return self.finished.__await__()-- async def wait(self):+ def wait(self):"""Waits till the terminal session exits."""- return await self.finished+ return self.finished.result()def __init__(self,terminal_id: str,session: SessionConnection,- trigger_exit: Callable[[], Coroutine[Any, Any, None]],- finished: Awaitable[TerminalOutput],+ trigger_exit: Callable[[], Any],+ finished: DeferredFuture[TerminalOutput],output: TerminalOutput,):self._terminal_id = terminal_id@@ -83,7 +75,7 @@ class Terminal:self._finished = finishedself._output = output- async def send_data(self, data: str, timeout: Optional[float] = TIMEOUT) -> None:+ def send_data(self, data: str, timeout: Optional[float] = TIMEOUT) -> None:"""Sends data to the terminal standard input.@@ -91,7 +83,7 @@ class Terminal::param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time"""try:- await self._session._call(+ self._session._call(TerminalManager._service_name,"data",[self.terminal_id, data],@@ -100,9 +92,7 @@ class Terminal:except RpcException as e:raise TerminalException(e.message) from e- async def resize(- self, cols: int, rows: int, timeout: Optional[float] = TIMEOUT- ) -> None:+ def resize(self, cols: int, rows: int, timeout: Optional[float] = TIMEOUT) -> None:"""Resizes the terminal tty.@@ -111,7 +101,7 @@ class Terminal::param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time"""try:- await self._session._call(+ self._session._call(TerminalManager._service_name,"resize",[self.terminal_id, cols, rows],@@ -120,14 +110,14 @@ class Terminal:except RpcException as e:raise TerminalException(e.message) from e- async def kill(self, timeout: Optional[float] = TIMEOUT) -> None:+ def kill(self, timeout: Optional[float] = TIMEOUT) -> None:"""Kill the terminal session.:param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time"""try:- await self._session._call(+ self._session._call(TerminalManager._service_name,"destroy",[self.terminal_id],@@ -135,67 +125,15 @@ class Terminal:)except RpcException as e:raise TerminalException(e.message) from e- await self._trigger_exit()---class SyncTerminal(Terminal):- """- Terminal session.- """-- def __init__(- self,- terminal_id: str,- session: SessionConnection,- trigger_exit: Callable[[], Coroutine[Any, Any, None]],- finished: Awaitable[TerminalOutput],- output: TerminalOutput,- loop: asyncio.AbstractEventLoop,- ):- super().__init__(terminal_id, session, trigger_exit, finished, output)- self._loop = loop-- def wait(self):- """- Waits till the terminal session exits.- """- return self._loop.run_until_complete(super().wait())-- def send_data(self, data: str, timeout: Optional[float] = TIMEOUT) -> None:- """- Sends data to the terminal standard input.+ self._trigger_exit()- :param data: Data to send- :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time- """- return self._loop.run_until_complete(super().send_data(data, timeout))-- def resize(self, cols: int, rows: int, timeout: Optional[float] = TIMEOUT) -> None:- """- Resizes the terminal tty.- :param cols: Number of columns- :param rows: Number of rows- :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time- """- return self._loop.run_until_complete(super().resize(cols, rows, timeout))-- def kill(self, timeout: Optional[float] = TIMEOUT) -> None:- """- Kill the terminal session.-- :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time- """- return self._loop.run_until_complete(super().kill(timeout))---class BaseTerminalManager(ABC):+class TerminalManager:"""Manager for starting and interacting with terminal sessions in the environment."""_service_name = "terminal"- _terminal_class: Union[Type[Terminal], Type[SyncTerminal]]def __init__(self, session: SessionConnection):self._session = session@@ -207,114 +145,7 @@ class BaseTerminalManager(ABC):self._process_cleanup.clear()- async def start(- self,- on_data: Callable[[str], Any],- cols: int,- rows: int,- cwd: str = "",- terminal_id: Optional[str] = None,- on_exit: Optional[Callable[[], Any]] = None,- cmd: Optional[str] = None,- env_vars: Optional[EnvVars] = None,- timeout: Optional[float] = TIMEOUT,- ) -> Union[Terminal, SyncTerminal]:- async with async_timeout.timeout(timeout):- env_vars = self._session.env_vars.update(env_vars or {})-- future_exit = DeferredFuture(self._process_cleanup)- terminal_id = terminal_id or create_id(12)-- unsub_all: Optional[Callable[[], Awaitable[Any]]] = None-- output = TerminalOutput()-- def handle_data(data: str):- output._add_data(data)- on_data(data)-- try:- unsub_all = await self._session._handle_subscriptions(- self._session._subscribe(- self._service_name, handle_data, "onData", terminal_id- ),- self._session._subscribe(- self._service_name, future_exit, "onExit", terminal_id- ),- )- except (RpcException, MultipleExceptions) as e:- future_exit.cancel()-- if isinstance(e, RpcException):- raise TerminalException(e.message) from e- elif isinstance(e, MultipleExceptions):- raise TerminalException(- "Failed to subscribe to RPC services necessary for starting terminal"- ) from e- except asyncio.TimeoutError:- future_exit.cancel()- logger.error(f"Timeout error during starting the terminal: {cmd}")- raise-- # TODO: Handle exit handler finish for exits (the same for processes)- future_exit_handler_finish = DeferredFuture[TerminalOutput](- self._process_cleanup- )-- async def exit_handler():- await future_exit-- if unsub_all:- await unsub_all()-- if on_exit:- on_exit()- future_exit_handler_finish(output)-- exit_task = asyncio.create_task(exit_handler())- self._process_cleanup.append(exit_task.cancel)-- async def trigger_exit():- future_exit(None)- await future_exit_handler_finish-- try:- if not cwd and self._session.cwd:- cwd = self._session.cwd-- await self._session._call(- self._service_name,- "start",- [- terminal_id,- cols,- rows,- env_vars if env_vars else {},- cmd,- cwd,- ],- timeout=timeout,- )- return self._terminal_class(- terminal_id=terminal_id,- session=self._session,- trigger_exit=trigger_exit,- finished=future_exit_handler_finish,- output=output,- )- except RpcException as e:- await trigger_exit()- raise TerminalException(e.message) from e- except asyncio.TimeoutError:- logger.error(f"Timeout error during starting the terminal: {cmd}")- await trigger_exit()- raise---class TerminalManager(BaseTerminalManager):- _terminal_class = Terminal-- async def start(+ def start(self,on_data: Callable[[str], Any],cols: int,@@ -325,7 +156,7 @@ class TerminalManager(BaseTerminalManager):cmd: Optional[str] = None,env_vars: Optional[EnvVars] = None,timeout: Optional[float] = TIMEOUT,- ) -> Union[Terminal, SyncTerminal]:+ ) -> Terminal:"""Start a new terminal session.@@ -342,68 +173,87 @@ class TerminalManager(BaseTerminalManager)::return: Terminal session"""- return await super().start(- on_data,- cols,- rows,- cwd,- terminal_id,- on_exit,- cmd,- env_vars,- timeout,+ env_vars = self._session.env_vars.update(env_vars or {})++ future_exit = DeferredFuture(self._process_cleanup)+ terminal_id = terminal_id or create_id(12)++ unsub_all: Optional[Callable[[], Any]] = None++ output = TerminalOutput()++ def handle_data(data: str):+ output._add_data(data)+ on_data(data)++ try:+ unsub_all = self._session._handle_subscriptions(+ self._session._subscribe(+ self._service_name, handle_data, "onData", terminal_id+ ),+ self._session._subscribe(+ self._service_name, future_exit, "onExit", terminal_id+ ),+ )+ except (RpcException, MultipleExceptions) as e:+ future_exit.cancel()++ if isinstance(e, RpcException):+ raise TerminalException(e.message) from e+ elif isinstance(e, MultipleExceptions):+ raise TerminalException(+ "Failed to subscribe to RPC services necessary for starting terminal"+ ) from e++ # TODO: Handle exit handler finish for exits (the same for processes)+ future_exit_handler_finish = DeferredFuture[TerminalOutput](+ self._process_cleanup)+ def exit_handler():+ future_exit.result()-class SyncTerminalManager(BaseTerminalManager):- """- Manager for starting and interacting with terminal sessions in the environment.- """+ if unsub_all:+ unsub_all()- _terminal_class = SyncTerminal+ if on_exit:+ on_exit()+ future_exit_handler_finish(output)- def __init__(self, session: SessionConnection, loop: asyncio.AbstractEventLoop):- super().__init__(session)- self._loop = loop+ executor = ThreadPoolExecutor(thread_name_prefix="e2b-terminal-exit-handler")+ exit_task = executor.submit(exit_handler)- def start(- self,- on_data: Callable[[str], Any],- cols: int,- rows: int,- cwd: str = "",- terminal_id: Optional[str] = None,- on_exit: Optional[Callable[[], Any]] = None,- cmd: Optional[str] = None,- env_vars: Optional[EnvVars] = None,- timeout: Optional[float] = TIMEOUT,- ) -> SyncTerminal:- """- Start a new terminal session.+ self._process_cleanup.append(exit_task.cancel)+ self._process_cleanup.append(lambda: shutdown_executor(executor))- :param on_data: Callback that will be called when the terminal sends data- :param cwd: Working directory where will the terminal start- :param terminal_id: Unique identifier of the terminal session- :param on_exit: Callback that will be called when the terminal exits- :param cols: Number of columns the terminal will have. This affects rendering- :param rows: Number of rows the terminal will have. This affects rendering- :param cmd: If the `cmd` parameter is defined it will be executed as a command- and this terminal session will exit when the command exits- :param env_vars: Environment variables that will be accessible inside of the terminal- :param timeout: Specify the duration, in seconds to give the method to finish its execution before it times out (default is 60 seconds). If set to None, the method will continue to wait until it completes, regardless of time+ def trigger_exit():+ future_exit(None)+ future_exit_handler_finish.result()- :return: Terminal session- """- return self._loop.run_until_complete(- super().start(- on_data,- cols,- rows,- cwd,- terminal_id,- on_exit,- cmd,- env_vars,- timeout,+ try:+ if not cwd and self._session.cwd:+ cwd = self._session.cwd++ self._session._call(+ self._service_name,+ "start",+ [+ terminal_id,+ cols,+ rows,+ env_vars if env_vars else {},+ cmd,+ cwd,+ ],+ timeout=timeout,)- )+ return Terminal(+ terminal_id=terminal_id,+ session=self._session,+ trigger_exit=trigger_exit,+ finished=future_exit_handler_finish,+ output=output,+ )+ except RpcException as e:+ trigger_exit()+ raise TerminalException(e.message) from ediff --git a/packages/python-sdk/e2b/session/websocket_client.py b/packages/python-sdk/e2b/session/websocket_client.pyindex 2b8c2f9e3..8cd86f72b 100644--- a/packages/python-sdk/e2b/session/websocket_client.py+++ b/packages/python-sdk/e2b/session/websocket_client.py@@ -6,7 +6,6 @@ from queue import Queuefrom threading import Eventfrom typing import Any, Callable, List, Optional-from janus import SyncQueue as JanusQueuefrom websockets import WebSocketClientProtocol, connectfrom websockets.exceptions import ConnectionClosedfrom websockets.typing import Data@@ -21,7 +20,7 @@ class WebSocket:started: Event,stopped: Event,queue_in: Queue[dict],- queue_out: JanusQueue[Data],+ queue_out: Queue[Data],):self._ws: Optional[WebSocketClientProtocol] = Noneself.url = urldiff --git a/packages/python-sdk/e2b/templates/data_analysis.py b/packages/python-sdk/e2b/templates/data_analysis.pyindex a8e0caa9e..a9a59a211 100644--- a/packages/python-sdk/e2b/templates/data_analysis.py+++ b/packages/python-sdk/e2b/templates/data_analysis.py@@ -4,15 +4,15 @@ from typing import Optional, Callable, Any, Tuple, List, Unionfrom pydantic import BaseModel, PrivateAttr+from e2b import EnvVars, Sessionfrom e2b.constants import TIMEOUT-from e2b import EnvVars, SyncSessionlogger = logging.getLogger(__name__)class Artifact(BaseModel):name: str- _session: SyncSession = PrivateAttr()+ _session: Session = PrivateAttr()def __init__(self, **data: Any):super().__init__(**data)@@ -24,7 +24,8 @@ class Artifact(BaseModel):def download(self) -> bytes:return self._session.download_file(self.name)-class DataAnalysis(SyncSession):++class DataAnalysis(Session):env_id = "Python3-DataAnalysis"def __init__(@@ -47,10 +48,6 @@ class DataAnalysis(SyncSession):on_stderr=on_stderr,on_exit=on_exit,)- self.open()-- def create(self, *args, **kwargs):- raise Exception("Wrong syntax. Use only `DataAnalysis(...)`")def run_python(self,@@ -65,7 +62,7 @@ class DataAnalysis(SyncSession):) -> Tuple[str, str, List[Artifact]]:artifacts = set()- def register_artifacts(event: Any):+ def register_artifacts(event: Any) -> None:if event.operation == "Create":artifact = Artifact(name=event.path, _session=self)artifacts.add(artifact)@@ -84,7 +81,7 @@ class DataAnalysis(SyncSession):self.filesystem.write(codefile_path, code)process = self.process.start(- f'python {codefile_path}',+ f"python {codefile_path}",on_stdout=on_stdout,on_stderr=on_stderr,on_exit=on_exit,@@ -99,11 +96,13 @@ class DataAnalysis(SyncSession):return process.output.stdout, process.output.stderr, list(artifacts)- def install_python_packages(self, package_names: Union[str, List[str]]):+ def install_python_packages(+ self, package_names: Union[str, List[str]], timeout: Optional[float] = TIMEOUT+ ) -> None:if isinstance(package_names, list):package_names = " ".join(package_names)- process = self.process.start(f"pip install {package_names}")+ process = self.process.start(f"pip install {package_names}", timeout=timeout)process.wait()if process.exit_code != 0:@@ -111,11 +110,13 @@ class DataAnalysis(SyncSession):f"Failed to install package {package_names}: {process.output.stderr}")- def install_system_packages(self, package_names: Union[str, List[str]]):+ def install_system_packages(+ self, package_names: Union[str, List[str]], timeout: Optional[float] = TIMEOUT+ ) -> None:if isinstance(package_names, list):package_names = " ".join(package_names)- process = self.process.start(f"apt-get {package_names}")+ process = self.process.start(f"apt-get {package_names}", timeout=timeout)process.wait()if process.exit_code != 0:diff --git a/packages/python-sdk/e2b/utils/future.py b/packages/python-sdk/e2b/utils/future.pyindex b4c63dec3..8ef145bde 100644--- a/packages/python-sdk/e2b/utils/future.py+++ b/packages/python-sdk/e2b/utils/future.py@@ -1,4 +1,5 @@import asyncio+from concurrent.futures import Futurefrom typing import Any, Awaitable, Callable, Generic, List, Optional, TypeVarT = TypeVar("T")@@ -7,7 +8,7 @@ T = TypeVar("T")# Check if using event is not better for most use casesclass DeferredFuture(Generic[T]):def __init__(self, cleanup_list: Optional[List[Callable[[], Any]]] = None):- self._future = asyncio.Future()+ self._future = Future()if cleanup_list is not None:cleanup_list.append(self.cancel)@@ -15,9 +16,11 @@ class DeferredFuture(Generic[T]):if not self._future.done():self._future.set_result(result)- def __await__(self):- result = yield from self._future.__await__()- return result+ def result(self, timeout: Optional[float] = None) -> T:+ return self._future.result(timeout=timeout)++ def done(self) -> bool:+ return self._future.done()def cancel(self):if not self._future.done():diff --git a/packages/python-sdk/e2b/utils/threads.py b/packages/python-sdk/e2b/utils/threads.pyindex a10de93cb..39dc9badc 100644--- a/packages/python-sdk/e2b/utils/threads.py+++ b/packages/python-sdk/e2b/utils/threads.py@@ -1,8 +1,9 @@import queueimport sys+from concurrent.futures import ThreadPoolExecutor-def shutdown_executor(executor):+def shutdown_executor(executor: ThreadPoolExecutor):py_version = sys.version_infoif (py_version.major == 3) and (py_version.minor < 9):# py versions less than 3.9diff --git a/packages/python-sdk/example.py b/packages/python-sdk/example.pyindex 475e0661f..71cf36064 100644--- a/packages/python-sdk/example.py+++ b/packages/python-sdk/example.py@@ -1,4 +1,3 @@-import asyncioimport loggingfrom os import getenv@@ -13,124 +12,14 @@ E2B_API_KEY = getenv("E2B_API_KEY")logging.basicConfig(level=logging.ERROR)-async def main():- s = Session(- id="YI58BPyX5KrK",- api_key=E2B_API_KEY,- _debug_hostname="localhost",- _debug_port=49982,- _debug_dev_env="local",- )- await s.open()-- s.upload_file(file=open("results.csv", "rb"))-- exit()-- a = await s.process.start("ls -la /var ")- await a+def main():+ s = Session("Nodejs", api_key=E2B_API_KEY, timeout=0.0001)+ a = s.process.start("ls -la /var ")+ a.wait()print(a.stdout)print(a.stderr)+ s.close()return- session = await Session.create(id)-- # proc = await session.terminal.start(- # cwd="/code",- # cols=80,- # rows=24,- # on_data=lambda data: print("DATA", data),- # cmd="ls",- # )-- # out = proc.output-- # out = await proc- # print("OUT", out)-- # await proc.finished- proc = await session.process.start(- "ls",- cwd="/",- on_stderr=lambda data: print("ERR", data),- on_stdout=lambda data: print("OUT", data),- )- output = await proc-- # output.lines-- print(output.messages)-- await session.close()- return- await session.filesystem.write("test.txt", "Hello World")-- f = await session.filesystem.read("test.txt")- print("RESULT read2", f)-- await session.filesystem.make_dir("test")- ls = await session.filesystem.list("/")- print("RESULT ls", [ls for ls in ls if ls.is_dir and ls.name == "test"])-- await session.filesystem.remove("test")- ls = await session.filesystem.list("/")- print("RESULT ls", [ls for ls in ls if ls.is_dir and ls.name == "test"])-- w = await session.filesystem.watch_dir("/")-- w.add_event_listener(lambda e: print("EVENT", e))- await w.start()-- print("PATH", w.path)-- await session.filesystem.make_dir("testx")-- await w.stop()-- def on_stdout(data):- print("STDOUT", data)-- def on_stderr(data):- print("STDERR", data)-- url = session.get_hostname(80)- print("URL", url)-- proc = await session.process.start(- "pwd",- on_stdout=on_stdout,- on_stderr=on_stderr,- on_exit=lambda: print("EXIT"),- cwd="/code",- )- # await proc.send_stdin("lore olympus")- # await proc.send_stdin("\nnew line too")-- # await proc.kill()-- print("end")-- await session.process.start(cmd="python3 -m http.server 8022")-- term = await session.terminal.start(- on_data=lambda data: print("DATA", data),- cols=80,- rows=24,- cwd="/code",- )-- await term.send_data("echo 1\n")-- # await term- print("end")-- # await term.resize(80, 30)-- await term.kill()-- await session.close()-- # await asyncio.Future()--asyncio.run(main())+main()diff --git a/packages/python-sdk/poetry.lock b/packages/python-sdk/poetry.lockindex 360923764..233154dc7 100644--- a/packages/python-sdk/poetry.lock+++ b/packages/python-sdk/poetry.lock@@ -14,98 +14,98 @@ files = [[[package]]name = "aiohttp"-version = "3.8.5"+version = "3.8.6"description = "Async http client/server framework (asyncio)"optional = falsepython-versions = ">=3.6"files = [- {file = "aiohttp-3.8.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a94159871304770da4dd371f4291b20cac04e8c94f11bdea1c3478e557fbe0d8"},- {file = "aiohttp-3.8.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:13bf85afc99ce6f9ee3567b04501f18f9f8dbbb2ea11ed1a2e079670403a7c84"},- {file = "aiohttp-3.8.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2ce2ac5708501afc4847221a521f7e4b245abf5178cf5ddae9d5b3856ddb2f3a"},- {file = "aiohttp-3.8.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:96943e5dcc37a6529d18766597c491798b7eb7a61d48878611298afc1fca946c"},- {file = "aiohttp-3.8.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2ad5c3c4590bb3cc28b4382f031f3783f25ec223557124c68754a2231d989e2b"},- {file = "aiohttp-3.8.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0c413c633d0512df4dc7fd2373ec06cc6a815b7b6d6c2f208ada7e9e93a5061d"},- {file = "aiohttp-3.8.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:df72ac063b97837a80d80dec8d54c241af059cc9bb42c4de68bd5b61ceb37caa"},- {file = "aiohttp-3.8.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c48c5c0271149cfe467c0ff8eb941279fd6e3f65c9a388c984e0e6cf57538e14"},- {file = "aiohttp-3.8.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:368a42363c4d70ab52c2c6420a57f190ed3dfaca6a1b19afda8165ee16416a82"},- {file = "aiohttp-3.8.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7607ec3ce4993464368505888af5beb446845a014bc676d349efec0e05085905"},- {file = "aiohttp-3.8.5-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:0d21c684808288a98914e5aaf2a7c6a3179d4df11d249799c32d1808e79503b5"},- {file = "aiohttp-3.8.5-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:312fcfbacc7880a8da0ae8b6abc6cc7d752e9caa0051a53d217a650b25e9a691"},- {file = "aiohttp-3.8.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ad093e823df03bb3fd37e7dec9d4670c34f9e24aeace76808fc20a507cace825"},- {file = "aiohttp-3.8.5-cp310-cp310-win32.whl", hash = "sha256:33279701c04351a2914e1100b62b2a7fdb9a25995c4a104259f9a5ead7ed4802"},- {file = "aiohttp-3.8.5-cp310-cp310-win_amd64.whl", hash = "sha256:6e4a280e4b975a2e7745573e3fc9c9ba0d1194a3738ce1cbaa80626cc9b4f4df"},- {file = "aiohttp-3.8.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ae871a964e1987a943d83d6709d20ec6103ca1eaf52f7e0d36ee1b5bebb8b9b9"},- {file = "aiohttp-3.8.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:461908b2578955045efde733719d62f2b649c404189a09a632d245b445c9c975"},- {file = "aiohttp-3.8.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:72a860c215e26192379f57cae5ab12b168b75db8271f111019509a1196dfc780"},- {file = "aiohttp-3.8.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc14be025665dba6202b6a71cfcdb53210cc498e50068bc088076624471f8bb9"},- {file = "aiohttp-3.8.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8af740fc2711ad85f1a5c034a435782fbd5b5f8314c9a3ef071424a8158d7f6b"},- {file = "aiohttp-3.8.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:841cd8233cbd2111a0ef0a522ce016357c5e3aff8a8ce92bcfa14cef890d698f"},- {file = "aiohttp-3.8.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5ed1c46fb119f1b59304b5ec89f834f07124cd23ae5b74288e364477641060ff"},- {file = "aiohttp-3.8.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:84f8ae3e09a34f35c18fa57f015cc394bd1389bce02503fb30c394d04ee6b938"},- {file = "aiohttp-3.8.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:62360cb771707cb70a6fd114b9871d20d7dd2163a0feafe43fd115cfe4fe845e"},- {file = "aiohttp-3.8.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:23fb25a9f0a1ca1f24c0a371523546366bb642397c94ab45ad3aedf2941cec6a"},- {file = "aiohttp-3.8.5-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:b0ba0d15164eae3d878260d4c4df859bbdc6466e9e6689c344a13334f988bb53"},- {file = "aiohttp-3.8.5-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:5d20003b635fc6ae3f96d7260281dfaf1894fc3aa24d1888a9b2628e97c241e5"},- {file = "aiohttp-3.8.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:0175d745d9e85c40dcc51c8f88c74bfbaef9e7afeeeb9d03c37977270303064c"},- {file = "aiohttp-3.8.5-cp311-cp311-win32.whl", hash = "sha256:2e1b1e51b0774408f091d268648e3d57f7260c1682e7d3a63cb00d22d71bb945"},- {file = "aiohttp-3.8.5-cp311-cp311-win_amd64.whl", hash = "sha256:043d2299f6dfdc92f0ac5e995dfc56668e1587cea7f9aa9d8a78a1b6554e5755"},- {file = "aiohttp-3.8.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cae533195e8122584ec87531d6df000ad07737eaa3c81209e85c928854d2195c"},- {file = "aiohttp-3.8.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4f21e83f355643c345177a5d1d8079f9f28b5133bcd154193b799d380331d5d3"},- {file = "aiohttp-3.8.5-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a7a75ef35f2df54ad55dbf4b73fe1da96f370e51b10c91f08b19603c64004acc"},- {file = "aiohttp-3.8.5-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2e2e9839e14dd5308ee773c97115f1e0a1cb1d75cbeeee9f33824fa5144c7634"},- {file = "aiohttp-3.8.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c44e65da1de4403d0576473e2344828ef9c4c6244d65cf4b75549bb46d40b8dd"},- {file = "aiohttp-3.8.5-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:78d847e4cde6ecc19125ccbc9bfac4a7ab37c234dd88fbb3c5c524e8e14da543"},- {file = "aiohttp-3.8.5-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:c7a815258e5895d8900aec4454f38dca9aed71085f227537208057853f9d13f2"},- {file = "aiohttp-3.8.5-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:8b929b9bd7cd7c3939f8bcfffa92fae7480bd1aa425279d51a89327d600c704d"},- {file = "aiohttp-3.8.5-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:5db3a5b833764280ed7618393832e0853e40f3d3e9aa128ac0ba0f8278d08649"},- {file = "aiohttp-3.8.5-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:a0215ce6041d501f3155dc219712bc41252d0ab76474615b9700d63d4d9292af"},- {file = "aiohttp-3.8.5-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:fd1ed388ea7fbed22c4968dd64bab0198de60750a25fe8c0c9d4bef5abe13824"},- {file = "aiohttp-3.8.5-cp36-cp36m-win32.whl", hash = "sha256:6e6783bcc45f397fdebc118d772103d751b54cddf5b60fbcc958382d7dd64f3e"},- {file = "aiohttp-3.8.5-cp36-cp36m-win_amd64.whl", hash = "sha256:b5411d82cddd212644cf9360879eb5080f0d5f7d809d03262c50dad02f01421a"},- {file = "aiohttp-3.8.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:01d4c0c874aa4ddfb8098e85d10b5e875a70adc63db91f1ae65a4b04d3344cda"},- {file = "aiohttp-3.8.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5980a746d547a6ba173fd5ee85ce9077e72d118758db05d229044b469d9029a"},- {file = "aiohttp-3.8.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2a482e6da906d5e6e653be079b29bc173a48e381600161c9932d89dfae5942ef"},- {file = "aiohttp-3.8.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:80bd372b8d0715c66c974cf57fe363621a02f359f1ec81cba97366948c7fc873"},- {file = "aiohttp-3.8.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c1161b345c0a444ebcf46bf0a740ba5dcf50612fd3d0528883fdc0eff578006a"},- {file = "aiohttp-3.8.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cd56db019015b6acfaaf92e1ac40eb8434847d9bf88b4be4efe5bfd260aee692"},- {file = "aiohttp-3.8.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:153c2549f6c004d2754cc60603d4668899c9895b8a89397444a9c4efa282aaf4"},- {file = "aiohttp-3.8.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:4a01951fabc4ce26ab791da5f3f24dca6d9a6f24121746eb19756416ff2d881b"},- {file = "aiohttp-3.8.5-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bfb9162dcf01f615462b995a516ba03e769de0789de1cadc0f916265c257e5d8"},- {file = "aiohttp-3.8.5-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:7dde0009408969a43b04c16cbbe252c4f5ef4574ac226bc8815cd7342d2028b6"},- {file = "aiohttp-3.8.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:4149d34c32f9638f38f544b3977a4c24052042affa895352d3636fa8bffd030a"},- {file = "aiohttp-3.8.5-cp37-cp37m-win32.whl", hash = "sha256:68c5a82c8779bdfc6367c967a4a1b2aa52cd3595388bf5961a62158ee8a59e22"},- {file = "aiohttp-3.8.5-cp37-cp37m-win_amd64.whl", hash = "sha256:2cf57fb50be5f52bda004b8893e63b48530ed9f0d6c96c84620dc92fe3cd9b9d"},- {file = "aiohttp-3.8.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:eca4bf3734c541dc4f374ad6010a68ff6c6748f00451707f39857f429ca36ced"},- {file = "aiohttp-3.8.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1274477e4c71ce8cfe6c1ec2f806d57c015ebf84d83373676036e256bc55d690"},- {file = "aiohttp-3.8.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:28c543e54710d6158fc6f439296c7865b29e0b616629767e685a7185fab4a6b9"},- {file = "aiohttp-3.8.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:910bec0c49637d213f5d9877105d26e0c4a4de2f8b1b29405ff37e9fc0ad52b8"},- {file = "aiohttp-3.8.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5443910d662db951b2e58eb70b0fbe6b6e2ae613477129a5805d0b66c54b6cb7"},- {file = "aiohttp-3.8.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2e460be6978fc24e3df83193dc0cc4de46c9909ed92dd47d349a452ef49325b7"},- {file = "aiohttp-3.8.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fb1558def481d84f03b45888473fc5a1f35747b5f334ef4e7a571bc0dfcb11f8"},- {file = "aiohttp-3.8.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:34dd0c107799dcbbf7d48b53be761a013c0adf5571bf50c4ecad5643fe9cfcd0"},- {file = "aiohttp-3.8.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:aa1990247f02a54185dc0dff92a6904521172a22664c863a03ff64c42f9b5410"},- {file = "aiohttp-3.8.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:0e584a10f204a617d71d359fe383406305a4b595b333721fa50b867b4a0a1548"},- {file = "aiohttp-3.8.5-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:a3cf433f127efa43fee6b90ea4c6edf6c4a17109d1d037d1a52abec84d8f2e42"},- {file = "aiohttp-3.8.5-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:c11f5b099adafb18e65c2c997d57108b5bbeaa9eeee64a84302c0978b1ec948b"},- {file = "aiohttp-3.8.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:84de26ddf621d7ac4c975dbea4c945860e08cccde492269db4e1538a6a6f3c35"},- {file = "aiohttp-3.8.5-cp38-cp38-win32.whl", hash = "sha256:ab88bafedc57dd0aab55fa728ea10c1911f7e4d8b43e1d838a1739f33712921c"},- {file = "aiohttp-3.8.5-cp38-cp38-win_amd64.whl", hash = "sha256:5798a9aad1879f626589f3df0f8b79b3608a92e9beab10e5fda02c8a2c60db2e"},- {file = "aiohttp-3.8.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:a6ce61195c6a19c785df04e71a4537e29eaa2c50fe745b732aa937c0c77169f3"},- {file = "aiohttp-3.8.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:773dd01706d4db536335fcfae6ea2440a70ceb03dd3e7378f3e815b03c97ab51"},- {file = "aiohttp-3.8.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f83a552443a526ea38d064588613aca983d0ee0038801bc93c0c916428310c28"},- {file = "aiohttp-3.8.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f7372f7341fcc16f57b2caded43e81ddd18df53320b6f9f042acad41f8e049a"},- {file = "aiohttp-3.8.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ea353162f249c8097ea63c2169dd1aa55de1e8fecbe63412a9bc50816e87b761"},- {file = "aiohttp-3.8.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e5d47ae48db0b2dcf70bc8a3bc72b3de86e2a590fc299fdbbb15af320d2659de"},- {file = "aiohttp-3.8.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d827176898a2b0b09694fbd1088c7a31836d1a505c243811c87ae53a3f6273c1"},- {file = "aiohttp-3.8.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3562b06567c06439d8b447037bb655ef69786c590b1de86c7ab81efe1c9c15d8"},- {file = "aiohttp-3.8.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4e874cbf8caf8959d2adf572a78bba17cb0e9d7e51bb83d86a3697b686a0ab4d"},- {file = "aiohttp-3.8.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:6809a00deaf3810e38c628e9a33271892f815b853605a936e2e9e5129762356c"},- {file = "aiohttp-3.8.5-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:33776e945d89b29251b33a7e7d006ce86447b2cfd66db5e5ded4e5cd0340585c"},- {file = "aiohttp-3.8.5-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:eaeed7abfb5d64c539e2db173f63631455f1196c37d9d8d873fc316470dfbacd"},- {file = "aiohttp-3.8.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e91d635961bec2d8f19dfeb41a539eb94bd073f075ca6dae6c8dc0ee89ad6f91"},- {file = "aiohttp-3.8.5-cp39-cp39-win32.whl", hash = "sha256:00ad4b6f185ec67f3e6562e8a1d2b69660be43070bd0ef6fcec5211154c7df67"},- {file = "aiohttp-3.8.5-cp39-cp39-win_amd64.whl", hash = "sha256:c0a9034379a37ae42dea7ac1e048352d96286626251862e448933c0f59cbd79c"},- {file = "aiohttp-3.8.5.tar.gz", hash = "sha256:b9552ec52cc147dbf1944ac7ac98af7602e51ea2dcd076ed194ca3c0d1c7d0bc"},+ {file = "aiohttp-3.8.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:41d55fc043954cddbbd82503d9cc3f4814a40bcef30b3569bc7b5e34130718c1"},+ {file = "aiohttp-3.8.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1d84166673694841d8953f0a8d0c90e1087739d24632fe86b1a08819168b4566"},+ {file = "aiohttp-3.8.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:253bf92b744b3170eb4c4ca2fa58f9c4b87aeb1df42f71d4e78815e6e8b73c9e"},+ {file = "aiohttp-3.8.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3fd194939b1f764d6bb05490987bfe104287bbf51b8d862261ccf66f48fb4096"},+ {file = "aiohttp-3.8.6-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6c5f938d199a6fdbdc10bbb9447496561c3a9a565b43be564648d81e1102ac22"},+ {file = "aiohttp-3.8.6-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2817b2f66ca82ee699acd90e05c95e79bbf1dc986abb62b61ec8aaf851e81c93"},+ {file = "aiohttp-3.8.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0fa375b3d34e71ccccf172cab401cd94a72de7a8cc01847a7b3386204093bb47"},+ {file = "aiohttp-3.8.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9de50a199b7710fa2904be5a4a9b51af587ab24c8e540a7243ab737b45844543"},+ {file = "aiohttp-3.8.6-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e1d8cb0b56b3587c5c01de3bf2f600f186da7e7b5f7353d1bf26a8ddca57f965"},+ {file = "aiohttp-3.8.6-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:8e31e9db1bee8b4f407b77fd2507337a0a80665ad7b6c749d08df595d88f1cf5"},+ {file = "aiohttp-3.8.6-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:7bc88fc494b1f0311d67f29fee6fd636606f4697e8cc793a2d912ac5b19aa38d"},+ {file = "aiohttp-3.8.6-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:ec00c3305788e04bf6d29d42e504560e159ccaf0be30c09203b468a6c1ccd3b2"},+ {file = "aiohttp-3.8.6-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ad1407db8f2f49329729564f71685557157bfa42b48f4b93e53721a16eb813ed"},+ {file = "aiohttp-3.8.6-cp310-cp310-win32.whl", hash = "sha256:ccc360e87341ad47c777f5723f68adbb52b37ab450c8bc3ca9ca1f3e849e5fe2"},+ {file = "aiohttp-3.8.6-cp310-cp310-win_amd64.whl", hash = "sha256:93c15c8e48e5e7b89d5cb4613479d144fda8344e2d886cf694fd36db4cc86865"},+ {file = "aiohttp-3.8.6-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6e2f9cc8e5328f829f6e1fb74a0a3a939b14e67e80832975e01929e320386b34"},+ {file = "aiohttp-3.8.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e6a00ffcc173e765e200ceefb06399ba09c06db97f401f920513a10c803604ca"},+ {file = "aiohttp-3.8.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:41bdc2ba359032e36c0e9de5a3bd00d6fb7ea558a6ce6b70acedf0da86458321"},+ {file = "aiohttp-3.8.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:14cd52ccf40006c7a6cd34a0f8663734e5363fd981807173faf3a017e202fec9"},+ {file = "aiohttp-3.8.6-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2d5b785c792802e7b275c420d84f3397668e9d49ab1cb52bd916b3b3ffcf09ad"},+ {file = "aiohttp-3.8.6-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1bed815f3dc3d915c5c1e556c397c8667826fbc1b935d95b0ad680787896a358"},+ {file = "aiohttp-3.8.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:96603a562b546632441926cd1293cfcb5b69f0b4159e6077f7c7dbdfb686af4d"},+ {file = "aiohttp-3.8.6-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d76e8b13161a202d14c9584590c4df4d068c9567c99506497bdd67eaedf36403"},+ {file = "aiohttp-3.8.6-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e3f1e3f1a1751bb62b4a1b7f4e435afcdade6c17a4fd9b9d43607cebd242924a"},+ {file = "aiohttp-3.8.6-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:76b36b3124f0223903609944a3c8bf28a599b2cc0ce0be60b45211c8e9be97f8"},+ {file = "aiohttp-3.8.6-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:a2ece4af1f3c967a4390c284797ab595a9f1bc1130ef8b01828915a05a6ae684"},+ {file = "aiohttp-3.8.6-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:16d330b3b9db87c3883e565340d292638a878236418b23cc8b9b11a054aaa887"},+ {file = "aiohttp-3.8.6-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:42c89579f82e49db436b69c938ab3e1559e5a4409eb8639eb4143989bc390f2f"},+ {file = "aiohttp-3.8.6-cp311-cp311-win32.whl", hash = "sha256:efd2fcf7e7b9d7ab16e6b7d54205beded0a9c8566cb30f09c1abe42b4e22bdcb"},+ {file = "aiohttp-3.8.6-cp311-cp311-win_amd64.whl", hash = "sha256:3b2ab182fc28e7a81f6c70bfbd829045d9480063f5ab06f6e601a3eddbbd49a0"},+ {file = "aiohttp-3.8.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:fdee8405931b0615220e5ddf8cd7edd8592c606a8e4ca2a00704883c396e4479"},+ {file = "aiohttp-3.8.6-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d25036d161c4fe2225d1abff2bd52c34ed0b1099f02c208cd34d8c05729882f0"},+ {file = "aiohttp-3.8.6-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5d791245a894be071d5ab04bbb4850534261a7d4fd363b094a7b9963e8cdbd31"},+ {file = "aiohttp-3.8.6-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0cccd1de239afa866e4ce5c789b3032442f19c261c7d8a01183fd956b1935349"},+ {file = "aiohttp-3.8.6-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f13f60d78224f0dace220d8ab4ef1dbc37115eeeab8c06804fec11bec2bbd07"},+ {file = "aiohttp-3.8.6-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8a9b5a0606faca4f6cc0d338359d6fa137104c337f489cd135bb7fbdbccb1e39"},+ {file = "aiohttp-3.8.6-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:13da35c9ceb847732bf5c6c5781dcf4780e14392e5d3b3c689f6d22f8e15ae31"},+ {file = "aiohttp-3.8.6-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:4d4cbe4ffa9d05f46a28252efc5941e0462792930caa370a6efaf491f412bc66"},+ {file = "aiohttp-3.8.6-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:229852e147f44da0241954fc6cb910ba074e597f06789c867cb7fb0621e0ba7a"},+ {file = "aiohttp-3.8.6-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:713103a8bdde61d13490adf47171a1039fd880113981e55401a0f7b42c37d071"},+ {file = "aiohttp-3.8.6-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:45ad816b2c8e3b60b510f30dbd37fe74fd4a772248a52bb021f6fd65dff809b6"},+ {file = "aiohttp-3.8.6-cp36-cp36m-win32.whl", hash = "sha256:2b8d4e166e600dcfbff51919c7a3789ff6ca8b3ecce16e1d9c96d95dd569eb4c"},+ {file = "aiohttp-3.8.6-cp36-cp36m-win_amd64.whl", hash = "sha256:0912ed87fee967940aacc5306d3aa8ba3a459fcd12add0b407081fbefc931e53"},+ {file = "aiohttp-3.8.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e2a988a0c673c2e12084f5e6ba3392d76c75ddb8ebc6c7e9ead68248101cd446"},+ {file = "aiohttp-3.8.6-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ebf3fd9f141700b510d4b190094db0ce37ac6361a6806c153c161dc6c041ccda"},+ {file = "aiohttp-3.8.6-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3161ce82ab85acd267c8f4b14aa226047a6bee1e4e6adb74b798bd42c6ae1f80"},+ {file = "aiohttp-3.8.6-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d95fc1bf33a9a81469aa760617b5971331cdd74370d1214f0b3109272c0e1e3c"},+ {file = "aiohttp-3.8.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c43ecfef7deaf0617cee936836518e7424ee12cb709883f2c9a1adda63cc460"},+ {file = "aiohttp-3.8.6-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca80e1b90a05a4f476547f904992ae81eda5c2c85c66ee4195bb8f9c5fb47f28"},+ {file = "aiohttp-3.8.6-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:90c72ebb7cb3a08a7f40061079817133f502a160561d0675b0a6adf231382c92"},+ {file = "aiohttp-3.8.6-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bb54c54510e47a8c7c8e63454a6acc817519337b2b78606c4e840871a3e15349"},+ {file = "aiohttp-3.8.6-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:de6a1c9f6803b90e20869e6b99c2c18cef5cc691363954c93cb9adeb26d9f3ae"},+ {file = "aiohttp-3.8.6-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:a3628b6c7b880b181a3ae0a0683698513874df63783fd89de99b7b7539e3e8a8"},+ {file = "aiohttp-3.8.6-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:fc37e9aef10a696a5a4474802930079ccfc14d9f9c10b4662169671ff034b7df"},+ {file = "aiohttp-3.8.6-cp37-cp37m-win32.whl", hash = "sha256:f8ef51e459eb2ad8e7a66c1d6440c808485840ad55ecc3cafefadea47d1b1ba2"},+ {file = "aiohttp-3.8.6-cp37-cp37m-win_amd64.whl", hash = "sha256:b2fe42e523be344124c6c8ef32a011444e869dc5f883c591ed87f84339de5976"},+ {file = "aiohttp-3.8.6-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:9e2ee0ac5a1f5c7dd3197de309adfb99ac4617ff02b0603fd1e65b07dc772e4b"},+ {file = "aiohttp-3.8.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:01770d8c04bd8db568abb636c1fdd4f7140b284b8b3e0b4584f070180c1e5c62"},+ {file = "aiohttp-3.8.6-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3c68330a59506254b556b99a91857428cab98b2f84061260a67865f7f52899f5"},+ {file = "aiohttp-3.8.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:89341b2c19fb5eac30c341133ae2cc3544d40d9b1892749cdd25892bbc6ac951"},+ {file = "aiohttp-3.8.6-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:71783b0b6455ac8f34b5ec99d83e686892c50498d5d00b8e56d47f41b38fbe04"},+ {file = "aiohttp-3.8.6-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f628dbf3c91e12f4d6c8b3f092069567d8eb17814aebba3d7d60c149391aee3a"},+ {file = "aiohttp-3.8.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b04691bc6601ef47c88f0255043df6f570ada1a9ebef99c34bd0b72866c217ae"},+ {file = "aiohttp-3.8.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7ee912f7e78287516df155f69da575a0ba33b02dd7c1d6614dbc9463f43066e3"},+ {file = "aiohttp-3.8.6-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9c19b26acdd08dd239e0d3669a3dddafd600902e37881f13fbd8a53943079dbc"},+ {file = "aiohttp-3.8.6-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:99c5ac4ad492b4a19fc132306cd57075c28446ec2ed970973bbf036bcda1bcc6"},+ {file = "aiohttp-3.8.6-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:f0f03211fd14a6a0aed2997d4b1c013d49fb7b50eeb9ffdf5e51f23cfe2c77fa"},+ {file = "aiohttp-3.8.6-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:8d399dade330c53b4106160f75f55407e9ae7505263ea86f2ccca6bfcbdb4921"},+ {file = "aiohttp-3.8.6-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ec4fd86658c6a8964d75426517dc01cbf840bbf32d055ce64a9e63a40fd7b771"},+ {file = "aiohttp-3.8.6-cp38-cp38-win32.whl", hash = "sha256:33164093be11fcef3ce2571a0dccd9041c9a93fa3bde86569d7b03120d276c6f"},+ {file = "aiohttp-3.8.6-cp38-cp38-win_amd64.whl", hash = "sha256:bdf70bfe5a1414ba9afb9d49f0c912dc524cf60141102f3a11143ba3d291870f"},+ {file = "aiohttp-3.8.6-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:d52d5dc7c6682b720280f9d9db41d36ebe4791622c842e258c9206232251ab2b"},+ {file = "aiohttp-3.8.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4ac39027011414dbd3d87f7edb31680e1f430834c8cef029f11c66dad0670aa5"},+ {file = "aiohttp-3.8.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3f5c7ce535a1d2429a634310e308fb7d718905487257060e5d4598e29dc17f0b"},+ {file = "aiohttp-3.8.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b30e963f9e0d52c28f284d554a9469af073030030cef8693106d918b2ca92f54"},+ {file = "aiohttp-3.8.6-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:918810ef188f84152af6b938254911055a72e0f935b5fbc4c1a4ed0b0584aed1"},+ {file = "aiohttp-3.8.6-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:002f23e6ea8d3dd8d149e569fd580c999232b5fbc601c48d55398fbc2e582e8c"},+ {file = "aiohttp-3.8.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4fcf3eabd3fd1a5e6092d1242295fa37d0354b2eb2077e6eb670accad78e40e1"},+ {file = "aiohttp-3.8.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:255ba9d6d5ff1a382bb9a578cd563605aa69bec845680e21c44afc2670607a95"},+ {file = "aiohttp-3.8.6-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d67f8baed00870aa390ea2590798766256f31dc5ed3ecc737debb6e97e2ede78"},+ {file = "aiohttp-3.8.6-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:86f20cee0f0a317c76573b627b954c412ea766d6ada1a9fcf1b805763ae7feeb"},+ {file = "aiohttp-3.8.6-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:39a312d0e991690ccc1a61f1e9e42daa519dcc34ad03eb6f826d94c1190190dd"},+ {file = "aiohttp-3.8.6-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:e827d48cf802de06d9c935088c2924e3c7e7533377d66b6f31ed175c1620e05e"},+ {file = "aiohttp-3.8.6-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:bd111d7fc5591ddf377a408ed9067045259ff2770f37e2d94e6478d0f3fc0c17"},+ {file = "aiohttp-3.8.6-cp39-cp39-win32.whl", hash = "sha256:caf486ac1e689dda3502567eb89ffe02876546599bbf915ec94b1fa424eeffd4"},+ {file = "aiohttp-3.8.6-cp39-cp39-win_amd64.whl", hash = "sha256:3f0e27e5b733803333bb2371249f41cf42bae8884863e8e8965ec69bebe53132"},+ {file = "aiohttp-3.8.6.tar.gz", hash = "sha256:b0cf2a4501bff9330a8a5248b4ce951851e415bdcce9dc158e76cfd55e15085c"},][package.dependencies]@@ -136,13 +136,13 @@ frozenlist = ">=1.1.0"[[package]]name = "annotated-types"-version = "0.5.0"+version = "0.6.0"description = "Reusable constraint types to use with typing.Annotated"optional = false-python-versions = ">=3.7"+python-versions = ">=3.8"files = [- {file = "annotated_types-0.5.0-py3-none-any.whl", hash = "sha256:58da39888f92c276ad970249761ebea80ba544b77acddaa1a4d6cf78287d45fd"},- {file = "annotated_types-0.5.0.tar.gz", hash = "sha256:47cdc3490d9ac1506ce92c7aaa76c579dc3509ff11e098fc867e5130ab7be802"},+ {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"},+ {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"},][package.dependencies]@@ -236,86 +236,101 @@ files = [[[package]]name = "charset-normalizer"-version = "3.2.0"+version = "3.3.0"description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."optional = falsepython-versions = ">=3.7.0"files = [- {file = "charset-normalizer-3.2.0.tar.gz", hash = "sha256:3bb3d25a8e6c0aedd251753a79ae98a093c7e7b471faa3aa9a93a81431987ace"},- {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b87549028f680ca955556e3bd57013ab47474c3124dc069faa0b6545b6c9710"},- {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7c70087bfee18a42b4040bb9ec1ca15a08242cf5867c58726530bdf3945672ed"},- {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a103b3a7069b62f5d4890ae1b8f0597618f628b286b03d4bc9195230b154bfa9"},- {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94aea8eff76ee6d1cdacb07dd2123a68283cb5569e0250feab1240058f53b623"},- {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:db901e2ac34c931d73054d9797383d0f8009991e723dab15109740a63e7f902a"},- {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b0dac0ff919ba34d4df1b6131f59ce95b08b9065233446be7e459f95554c0dc8"},- {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:193cbc708ea3aca45e7221ae58f0fd63f933753a9bfb498a3b474878f12caaad"},- {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:09393e1b2a9461950b1c9a45d5fd251dc7c6f228acab64da1c9c0165d9c7765c"},- {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:baacc6aee0b2ef6f3d308e197b5d7a81c0e70b06beae1f1fcacffdbd124fe0e3"},- {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:bf420121d4c8dce6b889f0e8e4ec0ca34b7f40186203f06a946fa0276ba54029"},- {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:c04a46716adde8d927adb9457bbe39cf473e1e2c2f5d0a16ceb837e5d841ad4f"},- {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:aaf63899c94de41fe3cf934601b0f7ccb6b428c6e4eeb80da72c58eab077b19a"},- {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d62e51710986674142526ab9f78663ca2b0726066ae26b78b22e0f5e571238dd"},- {file = "charset_normalizer-3.2.0-cp310-cp310-win32.whl", hash = "sha256:04e57ab9fbf9607b77f7d057974694b4f6b142da9ed4a199859d9d4d5c63fe96"},- {file = "charset_normalizer-3.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:48021783bdf96e3d6de03a6e39a1171ed5bd7e8bb93fc84cc649d11490f87cea"},- {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4957669ef390f0e6719db3613ab3a7631e68424604a7b448f079bee145da6e09"},- {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:46fb8c61d794b78ec7134a715a3e564aafc8f6b5e338417cb19fe9f57a5a9bf2"},- {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f779d3ad205f108d14e99bb3859aa7dd8e9c68874617c72354d7ecaec2a054ac"},- {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f25c229a6ba38a35ae6e25ca1264621cc25d4d38dca2942a7fce0b67a4efe918"},- {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2efb1bd13885392adfda4614c33d3b68dee4921fd0ac1d3988f8cbb7d589e72a"},- {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f30b48dd7fa1474554b0b0f3fdfdd4c13b5c737a3c6284d3cdc424ec0ffff3a"},- {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:246de67b99b6851627d945db38147d1b209a899311b1305dd84916f2b88526c6"},- {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bd9b3b31adcb054116447ea22caa61a285d92e94d710aa5ec97992ff5eb7cf3"},- {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:8c2f5e83493748286002f9369f3e6607c565a6a90425a3a1fef5ae32a36d749d"},- {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3170c9399da12c9dc66366e9d14da8bf7147e1e9d9ea566067bbce7bb74bd9c2"},- {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7a4826ad2bd6b07ca615c74ab91f32f6c96d08f6fcc3902ceeedaec8cdc3bcd6"},- {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:3b1613dd5aee995ec6d4c69f00378bbd07614702a315a2cf6c1d21461fe17c23"},- {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9e608aafdb55eb9f255034709e20d5a83b6d60c054df0802fa9c9883d0a937aa"},- {file = "charset_normalizer-3.2.0-cp311-cp311-win32.whl", hash = "sha256:f2a1d0fd4242bd8643ce6f98927cf9c04540af6efa92323e9d3124f57727bfc1"},- {file = "charset_normalizer-3.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:681eb3d7e02e3c3655d1b16059fbfb605ac464c834a0c629048a30fad2b27489"},- {file = "charset_normalizer-3.2.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c57921cda3a80d0f2b8aec7e25c8aa14479ea92b5b51b6876d975d925a2ea346"},- {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41b25eaa7d15909cf3ac4c96088c1f266a9a93ec44f87f1d13d4a0e86c81b982"},- {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f058f6963fd82eb143c692cecdc89e075fa0828db2e5b291070485390b2f1c9c"},- {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a7647ebdfb9682b7bb97e2a5e7cb6ae735b1c25008a70b906aecca294ee96cf4"},- {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eef9df1eefada2c09a5e7a40991b9fc6ac6ef20b1372abd48d2794a316dc0449"},- {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e03b8895a6990c9ab2cdcd0f2fe44088ca1c65ae592b8f795c3294af00a461c3"},- {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ee4006268ed33370957f55bf2e6f4d263eaf4dc3cfc473d1d90baff6ed36ce4a"},- {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c4983bf937209c57240cff65906b18bb35e64ae872da6a0db937d7b4af845dd7"},- {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:3bb7fda7260735efe66d5107fb7e6af6a7c04c7fce9b2514e04b7a74b06bf5dd"},- {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:72814c01533f51d68702802d74f77ea026b5ec52793c791e2da806a3844a46c3"},- {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:70c610f6cbe4b9fce272c407dd9d07e33e6bf7b4aa1b7ffb6f6ded8e634e3592"},- {file = "charset_normalizer-3.2.0-cp37-cp37m-win32.whl", hash = "sha256:a401b4598e5d3f4a9a811f3daf42ee2291790c7f9d74b18d75d6e21dda98a1a1"},- {file = "charset_normalizer-3.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:c0b21078a4b56965e2b12f247467b234734491897e99c1d51cee628da9786959"},- {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:95eb302ff792e12aba9a8b8f8474ab229a83c103d74a750ec0bd1c1eea32e669"},- {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1a100c6d595a7f316f1b6f01d20815d916e75ff98c27a01ae817439ea7726329"},- {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6339d047dab2780cc6220f46306628e04d9750f02f983ddb37439ca47ced7149"},- {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4b749b9cc6ee664a3300bb3a273c1ca8068c46be705b6c31cf5d276f8628a94"},- {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a38856a971c602f98472050165cea2cdc97709240373041b69030be15047691f"},- {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f87f746ee241d30d6ed93969de31e5ffd09a2961a051e60ae6bddde9ec3583aa"},- {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89f1b185a01fe560bc8ae5f619e924407efca2191b56ce749ec84982fc59a32a"},- {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e1c8a2f4c69e08e89632defbfabec2feb8a8d99edc9f89ce33c4b9e36ab63037"},- {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2f4ac36d8e2b4cc1aa71df3dd84ff8efbe3bfb97ac41242fbcfc053c67434f46"},- {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a386ebe437176aab38c041de1260cd3ea459c6ce5263594399880bbc398225b2"},- {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:ccd16eb18a849fd8dcb23e23380e2f0a354e8daa0c984b8a732d9cfaba3a776d"},- {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:e6a5bf2cba5ae1bb80b154ed68a3cfa2fa00fde979a7f50d6598d3e17d9ac20c"},- {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:45de3f87179c1823e6d9e32156fb14c1927fcc9aba21433f088fdfb555b77c10"},- {file = "charset_normalizer-3.2.0-cp38-cp38-win32.whl", hash = "sha256:1000fba1057b92a65daec275aec30586c3de2401ccdcd41f8a5c1e2c87078706"},- {file = "charset_normalizer-3.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:8b2c760cfc7042b27ebdb4a43a4453bd829a5742503599144d54a032c5dc7e9e"},- {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:855eafa5d5a2034b4621c74925d89c5efef61418570e5ef9b37717d9c796419c"},- {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:203f0c8871d5a7987be20c72442488a0b8cfd0f43b7973771640fc593f56321f"},- {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e857a2232ba53ae940d3456f7533ce6ca98b81917d47adc3c7fd55dad8fab858"},- {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5e86d77b090dbddbe78867a0275cb4df08ea195e660f1f7f13435a4649e954e5"},- {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4fb39a81950ec280984b3a44f5bd12819953dc5fa3a7e6fa7a80db5ee853952"},- {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2dee8e57f052ef5353cf608e0b4c871aee320dd1b87d351c28764fc0ca55f9f4"},- {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8700f06d0ce6f128de3ccdbc1acaea1ee264d2caa9ca05daaf492fde7c2a7200"},- {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1920d4ff15ce893210c1f0c0e9d19bfbecb7983c76b33f046c13a8ffbd570252"},- {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c1c76a1743432b4b60ab3358c937a3fe1341c828ae6194108a94c69028247f22"},- {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f7560358a6811e52e9c4d142d497f1a6e10103d3a6881f18d04dbce3729c0e2c"},- {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:c8063cf17b19661471ecbdb3df1c84f24ad2e389e326ccaf89e3fb2484d8dd7e"},- {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:cd6dbe0238f7743d0efe563ab46294f54f9bc8f4b9bcf57c3c666cc5bc9d1299"},- {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1249cbbf3d3b04902ff081ffbb33ce3377fa6e4c7356f759f3cd076cc138d020"},- {file = "charset_normalizer-3.2.0-cp39-cp39-win32.whl", hash = "sha256:6c409c0deba34f147f77efaa67b8e4bb83d2f11c8806405f76397ae5b8c0d1c9"},- {file = "charset_normalizer-3.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:7095f6fbfaa55defb6b733cfeb14efaae7a29f0b59d8cf213be4e7ca0b857b80"},- {file = "charset_normalizer-3.2.0-py3-none-any.whl", hash = "sha256:8e098148dd37b4ce3baca71fb394c81dc5d9c7728c95df695d2dca218edf40e6"},+ {file = "charset-normalizer-3.3.0.tar.gz", hash = "sha256:63563193aec44bce707e0c5ca64ff69fa72ed7cf34ce6e11d5127555756fd2f6"},+ {file = "charset_normalizer-3.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:effe5406c9bd748a871dbcaf3ac69167c38d72db8c9baf3ff954c344f31c4cbe"},+ {file = "charset_normalizer-3.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4162918ef3098851fcd8a628bf9b6a98d10c380725df9e04caf5ca6dd48c847a"},+ {file = "charset_normalizer-3.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0570d21da019941634a531444364f2482e8db0b3425fcd5ac0c36565a64142c8"},+ {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5707a746c6083a3a74b46b3a631d78d129edab06195a92a8ece755aac25a3f3d"},+ {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:278c296c6f96fa686d74eb449ea1697f3c03dc28b75f873b65b5201806346a69"},+ {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a4b71f4d1765639372a3b32d2638197f5cd5221b19531f9245fcc9ee62d38f56"},+ {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5969baeaea61c97efa706b9b107dcba02784b1601c74ac84f2a532ea079403e"},+ {file = "charset_normalizer-3.3.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3f93dab657839dfa61025056606600a11d0b696d79386f974e459a3fbc568ec"},+ {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:db756e48f9c5c607b5e33dd36b1d5872d0422e960145b08ab0ec7fd420e9d649"},+ {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:232ac332403e37e4a03d209a3f92ed9071f7d3dbda70e2a5e9cff1c4ba9f0678"},+ {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:e5c1502d4ace69a179305abb3f0bb6141cbe4714bc9b31d427329a95acfc8bdd"},+ {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:2502dd2a736c879c0f0d3e2161e74d9907231e25d35794584b1ca5284e43f596"},+ {file = "charset_normalizer-3.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23e8565ab7ff33218530bc817922fae827420f143479b753104ab801145b1d5b"},+ {file = "charset_normalizer-3.3.0-cp310-cp310-win32.whl", hash = "sha256:1872d01ac8c618a8da634e232f24793883d6e456a66593135aeafe3784b0848d"},+ {file = "charset_normalizer-3.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:557b21a44ceac6c6b9773bc65aa1b4cc3e248a5ad2f5b914b91579a32e22204d"},+ {file = "charset_normalizer-3.3.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d7eff0f27edc5afa9e405f7165f85a6d782d308f3b6b9d96016c010597958e63"},+ {file = "charset_normalizer-3.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6a685067d05e46641d5d1623d7c7fdf15a357546cbb2f71b0ebde91b175ffc3e"},+ {file = "charset_normalizer-3.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0d3d5b7db9ed8a2b11a774db2bbea7ba1884430a205dbd54a32d61d7c2a190fa"},+ {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2935ffc78db9645cb2086c2f8f4cfd23d9b73cc0dc80334bc30aac6f03f68f8c"},+ {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fe359b2e3a7729010060fbca442ca225280c16e923b37db0e955ac2a2b72a05"},+ {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:380c4bde80bce25c6e4f77b19386f5ec9db230df9f2f2ac1e5ad7af2caa70459"},+ {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0d1e3732768fecb052d90d62b220af62ead5748ac51ef61e7b32c266cac9293"},+ {file = "charset_normalizer-3.3.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1b2919306936ac6efb3aed1fbf81039f7087ddadb3160882a57ee2ff74fd2382"},+ {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f8888e31e3a85943743f8fc15e71536bda1c81d5aa36d014a3c0c44481d7db6e"},+ {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:82eb849f085624f6a607538ee7b83a6d8126df6d2f7d3b319cb837b289123078"},+ {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7b8b8bf1189b3ba9b8de5c8db4d541b406611a71a955bbbd7385bbc45fcb786c"},+ {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:5adf257bd58c1b8632046bbe43ee38c04e1038e9d37de9c57a94d6bd6ce5da34"},+ {file = "charset_normalizer-3.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c350354efb159b8767a6244c166f66e67506e06c8924ed74669b2c70bc8735b1"},+ {file = "charset_normalizer-3.3.0-cp311-cp311-win32.whl", hash = "sha256:02af06682e3590ab952599fbadac535ede5d60d78848e555aa58d0c0abbde786"},+ {file = "charset_normalizer-3.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:86d1f65ac145e2c9ed71d8ffb1905e9bba3a91ae29ba55b4c46ae6fc31d7c0d4"},+ {file = "charset_normalizer-3.3.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:3b447982ad46348c02cb90d230b75ac34e9886273df3a93eec0539308a6296d7"},+ {file = "charset_normalizer-3.3.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:abf0d9f45ea5fb95051c8bfe43cb40cda383772f7e5023a83cc481ca2604d74e"},+ {file = "charset_normalizer-3.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b09719a17a2301178fac4470d54b1680b18a5048b481cb8890e1ef820cb80455"},+ {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b3d9b48ee6e3967b7901c052b670c7dda6deb812c309439adaffdec55c6d7b78"},+ {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:edfe077ab09442d4ef3c52cb1f9dab89bff02f4524afc0acf2d46be17dc479f5"},+ {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3debd1150027933210c2fc321527c2299118aa929c2f5a0a80ab6953e3bd1908"},+ {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86f63face3a527284f7bb8a9d4f78988e3c06823f7bea2bd6f0e0e9298ca0403"},+ {file = "charset_normalizer-3.3.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:24817cb02cbef7cd499f7c9a2735286b4782bd47a5b3516a0e84c50eab44b98e"},+ {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c71f16da1ed8949774ef79f4a0260d28b83b3a50c6576f8f4f0288d109777989"},+ {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:9cf3126b85822c4e53aa28c7ec9869b924d6fcfb76e77a45c44b83d91afd74f9"},+ {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:b3b2316b25644b23b54a6f6401074cebcecd1244c0b8e80111c9a3f1c8e83d65"},+ {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:03680bb39035fbcffe828eae9c3f8afc0428c91d38e7d61aa992ef7a59fb120e"},+ {file = "charset_normalizer-3.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4cc152c5dd831641e995764f9f0b6589519f6f5123258ccaca8c6d34572fefa8"},+ {file = "charset_normalizer-3.3.0-cp312-cp312-win32.whl", hash = "sha256:b8f3307af845803fb0b060ab76cf6dd3a13adc15b6b451f54281d25911eb92df"},+ {file = "charset_normalizer-3.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:8eaf82f0eccd1505cf39a45a6bd0a8cf1c70dcfc30dba338207a969d91b965c0"},+ {file = "charset_normalizer-3.3.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dc45229747b67ffc441b3de2f3ae5e62877a282ea828a5bdb67883c4ee4a8810"},+ {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f4a0033ce9a76e391542c182f0d48d084855b5fcba5010f707c8e8c34663d77"},+ {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ada214c6fa40f8d800e575de6b91a40d0548139e5dc457d2ebb61470abf50186"},+ {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b1121de0e9d6e6ca08289583d7491e7fcb18a439305b34a30b20d8215922d43c"},+ {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1063da2c85b95f2d1a430f1c33b55c9c17ffaf5e612e10aeaad641c55a9e2b9d"},+ {file = "charset_normalizer-3.3.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:70f1d09c0d7748b73290b29219e854b3207aea922f839437870d8cc2168e31cc"},+ {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:250c9eb0f4600361dd80d46112213dff2286231d92d3e52af1e5a6083d10cad9"},+ {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:750b446b2ffce1739e8578576092179160f6d26bd5e23eb1789c4d64d5af7dc7"},+ {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:fc52b79d83a3fe3a360902d3f5d79073a993597d48114c29485e9431092905d8"},+ {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:588245972aca710b5b68802c8cad9edaa98589b1b42ad2b53accd6910dad3545"},+ {file = "charset_normalizer-3.3.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e39c7eb31e3f5b1f88caff88bcff1b7f8334975b46f6ac6e9fc725d829bc35d4"},+ {file = "charset_normalizer-3.3.0-cp37-cp37m-win32.whl", hash = "sha256:abecce40dfebbfa6abf8e324e1860092eeca6f7375c8c4e655a8afb61af58f2c"},+ {file = "charset_normalizer-3.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:24a91a981f185721542a0b7c92e9054b7ab4fea0508a795846bc5b0abf8118d4"},+ {file = "charset_normalizer-3.3.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:67b8cc9574bb518ec76dc8e705d4c39ae78bb96237cb533edac149352c1f39fe"},+ {file = "charset_normalizer-3.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ac71b2977fb90c35d41c9453116e283fac47bb9096ad917b8819ca8b943abecd"},+ {file = "charset_normalizer-3.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3ae38d325b512f63f8da31f826e6cb6c367336f95e418137286ba362925c877e"},+ {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:542da1178c1c6af8873e143910e2269add130a299c9106eef2594e15dae5e482"},+ {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:30a85aed0b864ac88309b7d94be09f6046c834ef60762a8833b660139cfbad13"},+ {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aae32c93e0f64469f74ccc730a7cb21c7610af3a775157e50bbd38f816536b38"},+ {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15b26ddf78d57f1d143bdf32e820fd8935d36abe8a25eb9ec0b5a71c82eb3895"},+ {file = "charset_normalizer-3.3.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7f5d10bae5d78e4551b7be7a9b29643a95aded9d0f602aa2ba584f0388e7a557"},+ {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:249c6470a2b60935bafd1d1d13cd613f8cd8388d53461c67397ee6a0f5dce741"},+ {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:c5a74c359b2d47d26cdbbc7845e9662d6b08a1e915eb015d044729e92e7050b7"},+ {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:b5bcf60a228acae568e9911f410f9d9e0d43197d030ae5799e20dca8df588287"},+ {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:187d18082694a29005ba2944c882344b6748d5be69e3a89bf3cc9d878e548d5a"},+ {file = "charset_normalizer-3.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:81bf654678e575403736b85ba3a7867e31c2c30a69bc57fe88e3ace52fb17b89"},+ {file = "charset_normalizer-3.3.0-cp38-cp38-win32.whl", hash = "sha256:85a32721ddde63c9df9ebb0d2045b9691d9750cb139c161c80e500d210f5e26e"},+ {file = "charset_normalizer-3.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:468d2a840567b13a590e67dd276c570f8de00ed767ecc611994c301d0f8c014f"},+ {file = "charset_normalizer-3.3.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e0fc42822278451bc13a2e8626cf2218ba570f27856b536e00cfa53099724828"},+ {file = "charset_normalizer-3.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:09c77f964f351a7369cc343911e0df63e762e42bac24cd7d18525961c81754f4"},+ {file = "charset_normalizer-3.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:12ebea541c44fdc88ccb794a13fe861cc5e35d64ed689513a5c03d05b53b7c82"},+ {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:805dfea4ca10411a5296bcc75638017215a93ffb584c9e344731eef0dcfb026a"},+ {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:96c2b49eb6a72c0e4991d62406e365d87067ca14c1a729a870d22354e6f68115"},+ {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aaf7b34c5bc56b38c931a54f7952f1ff0ae77a2e82496583b247f7c969eb1479"},+ {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:619d1c96099be5823db34fe89e2582b336b5b074a7f47f819d6b3a57ff7bdb86"},+ {file = "charset_normalizer-3.3.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a0ac5e7015a5920cfce654c06618ec40c33e12801711da6b4258af59a8eff00a"},+ {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:93aa7eef6ee71c629b51ef873991d6911b906d7312c6e8e99790c0f33c576f89"},+ {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7966951325782121e67c81299a031f4c115615e68046f79b85856b86ebffc4cd"},+ {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:02673e456dc5ab13659f85196c534dc596d4ef260e4d86e856c3b2773ce09843"},+ {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:c2af80fb58f0f24b3f3adcb9148e6203fa67dd3f61c4af146ecad033024dde43"},+ {file = "charset_normalizer-3.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:153e7b6e724761741e0974fc4dcd406d35ba70b92bfe3fedcb497226c93b9da7"},+ {file = "charset_normalizer-3.3.0-cp39-cp39-win32.whl", hash = "sha256:d47ecf253780c90ee181d4d871cd655a789da937454045b17b5798da9393901a"},+ {file = "charset_normalizer-3.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:d97d85fa63f315a8bdaba2af9a6a686e0eceab77b3089af45133252618e70884"},+ {file = "charset_normalizer-3.3.0-py3-none-any.whl", hash = "sha256:e46cd37076971c1040fc8c41273a8b3e2c624ce4f2be3f5dfcb7a430c1d3acc2"},][[package]]@@ -463,20 +478,6 @@ files = [{file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"},]-[[package]]-name = "janus"-version = "1.0.0"-description = "Mixed sync-async queue to interoperate between asyncio tasks and classic threads"-optional = false-python-versions = ">=3.7"-files = [- {file = "janus-1.0.0-py3-none-any.whl", hash = "sha256:2596ea5482711c1ee3ef2df6c290aaf370a13c55a007826e8f7c32d696d1d00a"},- {file = "janus-1.0.0.tar.gz", hash = "sha256:df976f2cdcfb034b147a2d51edfc34ff6bfb12d4e2643d3ad0e10de058cb1612"},-]--[package.dependencies]-typing-extensions = ">=3.7.4.3"-[[package]]name = "jsonrpcclient"version = "4.0.3"@@ -586,13 +587,13 @@ files = [[[package]]name = "packaging"-version = "23.1"+version = "23.2"description = "Core utilities for Python packages"optional = falsepython-versions = ">=3.7"files = [- {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"},- {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"},+ {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"},+ {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"},][[package]]@@ -608,13 +609,13 @@ files = [[[package]]name = "platformdirs"-version = "3.10.0"+version = "3.11.0"description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."optional = falsepython-versions = ">=3.7"files = [- {file = "platformdirs-3.10.0-py3-none-any.whl", hash = "sha256:d7c24979f292f916dc9cbf8648319032f551ea8c49a4c9bf2fb556a02070ec1d"},- {file = "platformdirs-3.10.0.tar.gz", hash = "sha256:b45696dab2d7cc691a3226759c0d3b00c47c8b6e293d96f6436f733303f77f6d"},+ {file = "platformdirs-3.11.0-py3-none-any.whl", hash = "sha256:e9d171d00af68be50e9202731309c4e658fd8bc76f55c11c7dd760d023bda68e"},+ {file = "platformdirs-3.11.0.tar.gz", hash = "sha256:cf8ee52a3afdb965072dcc652433e0c7e3e40cf5ea1477cd4b3b1d2eb75495b3"},][package.extras]@@ -638,22 +639,22 @@ testing = ["pytest", "pytest-benchmark"][[package]]name = "psycopg2"-version = "2.9.8"+version = "2.9.9"description = "psycopg2 - Python-PostgreSQL Database Adapter"optional = false-python-versions = ">=3.6"+python-versions = ">=3.7"files = [- {file = "psycopg2-2.9.8-cp310-cp310-win32.whl", hash = "sha256:2f8594f92bbb5d8b59ffec04e2686c416401e2d4297de1193f8e75235937e71d"},- {file = "psycopg2-2.9.8-cp310-cp310-win_amd64.whl", hash = "sha256:f9ecbf504c4eaff90139d5c9b95d47275f2b2651e14eba56392b4041fbf4c2b3"},- {file = "psycopg2-2.9.8-cp311-cp311-win32.whl", hash = "sha256:65f81e72136d8b9ac8abf5206938d60f50da424149a43b6073f1546063c0565e"},- {file = "psycopg2-2.9.8-cp311-cp311-win_amd64.whl", hash = "sha256:f7e62095d749359b7854143843f27edd7dccfcd3e1d833b880562aa5702d92b0"},- {file = "psycopg2-2.9.8-cp37-cp37m-win32.whl", hash = "sha256:81b21424023a290a40884c7f8b0093ba6465b59bd785c18f757e76945f65594c"},- {file = "psycopg2-2.9.8-cp37-cp37m-win_amd64.whl", hash = "sha256:67c2f32f3aba79afb15799575e77ee2db6b46b8acf943c21d34d02d4e1041d50"},- {file = "psycopg2-2.9.8-cp38-cp38-win32.whl", hash = "sha256:287a64ef168ef7fb9f382964705ff664b342bfff47e7242bf0a04ef203269dd5"},- {file = "psycopg2-2.9.8-cp38-cp38-win_amd64.whl", hash = "sha256:dcde3cad4920e29e74bf4e76c072649764914facb2069e6b7fa1ddbebcd49e9f"},- {file = "psycopg2-2.9.8-cp39-cp39-win32.whl", hash = "sha256:d4ad050ea50a16731d219c3a85e8f2debf49415a070f0b8331ccc96c81700d9b"},- {file = "psycopg2-2.9.8-cp39-cp39-win_amd64.whl", hash = "sha256:d39bb3959788b2c9d7bf5ff762e29f436172b241cd7b47529baac77746fd7918"},- {file = "psycopg2-2.9.8.tar.gz", hash = "sha256:3da6488042a53b50933244085f3f91803f1b7271f970f3e5536efa69314f6a49"},+ {file = "psycopg2-2.9.9-cp310-cp310-win32.whl", hash = "sha256:38a8dcc6856f569068b47de286b472b7c473ac7977243593a288ebce0dc89516"},+ {file = "psycopg2-2.9.9-cp310-cp310-win_amd64.whl", hash = "sha256:426f9f29bde126913a20a96ff8ce7d73fd8a216cfb323b1f04da402d452853c3"},+ {file = "psycopg2-2.9.9-cp311-cp311-win32.whl", hash = "sha256:ade01303ccf7ae12c356a5e10911c9e1c51136003a9a1d92f7aa9d010fb98372"},+ {file = "psycopg2-2.9.9-cp311-cp311-win_amd64.whl", hash = "sha256:121081ea2e76729acfb0673ff33755e8703d45e926e416cb59bae3a86c6a4981"},+ {file = "psycopg2-2.9.9-cp37-cp37m-win32.whl", hash = "sha256:5e0d98cade4f0e0304d7d6f25bbfbc5bd186e07b38eac65379309c4ca3193efa"},+ {file = "psycopg2-2.9.9-cp37-cp37m-win_amd64.whl", hash = "sha256:7e2dacf8b009a1c1e843b5213a87f7c544b2b042476ed7755be813eaf4e8347a"},+ {file = "psycopg2-2.9.9-cp38-cp38-win32.whl", hash = "sha256:ff432630e510709564c01dafdbe996cb552e0b9f3f065eb89bdce5bd31fabf4c"},+ {file = "psycopg2-2.9.9-cp38-cp38-win_amd64.whl", hash = "sha256:bac58c024c9922c23550af2a581998624d6e02350f4ae9c5f0bc642c633a2d5e"},+ {file = "psycopg2-2.9.9-cp39-cp39-win32.whl", hash = "sha256:c92811b2d4c9b6ea0285942b2e7cac98a59e166d59c588fe5cfe1eda58e72d59"},+ {file = "psycopg2-2.9.9-cp39-cp39-win_amd64.whl", hash = "sha256:de80739447af31525feddeb8effd640782cf5998e1a4e9192ebdf829717e3913"},+ {file = "psycopg2-2.9.9.tar.gz", hash = "sha256:d1454bde93fb1e224166811694d600e746430c006fbb031ea06ecc2ea41bf156"},][[package]]@@ -815,24 +816,6 @@ tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""}[package.extras]testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"]-[[package]]-name = "pytest-asyncio"-version = "0.21.1"-description = "Pytest support for asyncio"-optional = false-python-versions = ">=3.7"-files = [- {file = "pytest-asyncio-0.21.1.tar.gz", hash = "sha256:40a7eae6dded22c7b604986855ea48400ab15b069ae38116e8c01238e9eeb64d"},- {file = "pytest_asyncio-0.21.1-py3-none-any.whl", hash = "sha256:8666c1c8ac02631d7c51ba282e0c69a8a452b211ffedf2599099845da5c5c37b"},-]--[package.dependencies]-pytest = ">=7.0.0"--[package.extras]-docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"]-testing = ["coverage (>=6.2)", "flaky (>=3.5.0)", "hypothesis (>=5.7.1)", "mypy (>=0.931)", "pytest-trio (>=0.7.0)"]-[[package]]name = "pytest-xdist"version = "3.3.1"@@ -937,13 +920,13 @@ files = [[[package]]name = "urllib3"-version = "2.0.5"+version = "2.0.6"description = "HTTP library with thread-safe connection pooling, file post, and more."optional = falsepython-versions = ">=3.7"files = [- {file = "urllib3-2.0.5-py3-none-any.whl", hash = "sha256:ef16afa8ba34a1f989db38e1dbbe0c302e4289a47856990d0682e374563ce35e"},- {file = "urllib3-2.0.5.tar.gz", hash = "sha256:13abf37382ea2ce6fb744d4dad67838eec857c9f4f57009891805e0b5e123594"},+ {file = "urllib3-2.0.6-py3-none-any.whl", hash = "sha256:7a7c7003b000adf9e7ca2a377c9688bbc54ed41b985789ed576570342a375cd2"},+ {file = "urllib3-2.0.6.tar.gz", hash = "sha256:b19e1a85d206b56d7df1d5e683df4a7725252a964e3993648dd0fb5a1c157564"},][package.extras]@@ -1121,4 +1104,4 @@ multidict = ">=4.0"[metadata]lock-version = "2.0"python-versions = "^3.8"-content-hash = "913774020976e4ff7cdb5a34d28c893ee0be9f4c723c05880aefd290f9cbc485"+content-hash = "58881bb28e738261cc2a33f2f7c3b5e1a265a45fb9551a9e4dd0f4d26247db86"diff --git a/packages/python-sdk/pyproject.toml b/packages/python-sdk/pyproject.tomlindex e91d38545..3c243565e 100644--- a/packages/python-sdk/pyproject.toml+++ b/packages/python-sdk/pyproject.toml@@ -19,15 +19,12 @@ pydantic = "*"aenum = ">=3.1.11"websockets = "^11.0.3"jsonrpcclient = "^4.0.3"-janus = "^1.0.0"-async-timeout = "^4.0.3"requests = "^2.31.0"[tool.poetry.group.dev.dependencies]black = "^23.7.0"pytest = "^7.4.0"pytest-xdist = "^3.3.1"-pytest-asyncio = "^0.21.1"psycopg2 = "^2.9.7"python-dotenv = "^1.0.0"diff --git a/packages/python-sdk/tests/infra/test_homedir.py b/packages/python-sdk/tests/infra/test_homedir.pyindex f04dd8daf..67c3727e9 100644--- a/packages/python-sdk/tests/infra/test_homedir.py+++ b/packages/python-sdk/tests/infra/test_homedir.py@@ -1,11 +1,11 @@from e2b import Session-async def test_homedir():- session = await Session.create("Bash")+def test_homedir():+ session = Session("Bash")- process = await session.process.start("echo $HOME")- await process+ process = session.process.start("echo $HOME")+ process.wait()output = process.stdoutassert output == "/home/user"- await session.close()+ session.close()diff --git a/packages/python-sdk/tests/infra/test_install_package.py b/packages/python-sdk/tests/infra/test_install_package.pyindex ad4a0cbb1..0fc4080b7 100644--- a/packages/python-sdk/tests/infra/test_install_package.py+++ b/packages/python-sdk/tests/infra/test_install_package.py@@ -1,14 +1,14 @@from e2b import Session-async def test_python_package():- session = await Session.create("Python3")+def test_python_package():+ session = Session("Python3")- process = await session.process.start("pip install pip-install-test")- await process+ process = session.process.start("pip install pip-install-test")+ process.wait()- process = await session.process.start('python -c "import pip_install_test"')- await process+ process = session.process.start('python -c "import pip_install_test"')+ process.wait()output = process.stdoutassert "Good job!" in output- await session.close()+ session.close()diff --git a/packages/python-sdk/tests/infra/test_sudo.py b/packages/python-sdk/tests/infra/test_sudo.pyindex 53e905503..503fea859 100644--- a/packages/python-sdk/tests/infra/test_sudo.py+++ b/packages/python-sdk/tests/infra/test_sudo.py@@ -1,11 +1,11 @@from e2b import Session-async def test_sudo():- session = await Session.create("Nodejs")+def test_sudo():+ session = Session("Nodejs")- process = await session.process.start("sudo echo test")- await process+ process = session.process.start("sudo echo test")+ process.wait()output = process.stdoutassert output == "test"- await session.close()+ session.close()diff --git a/packages/python-sdk/tests/test_cwd.py b/packages/python-sdk/tests/test_cwd.pyindex 2d390cae9..4b7789af0 100644--- a/packages/python-sdk/tests/test_cwd.py+++ b/packages/python-sdk/tests/test_cwd.py@@ -3,83 +3,83 @@ import pytestfrom e2b import Session-async def test_process_cwd():- session = await Session.create("Nodejs", cwd="/code/app")+def test_process_cwd():+ session = Session("Nodejs", cwd="/code/app")- proc = await session.process.start("pwd")- output = await proc+ proc = session.process.start("pwd")+ output = proc.wait()assert output.stdout == "/code/app"- await session.close()+ session.close()-async def test_filesystem_cwd():- session = await Session.create("Nodejs", cwd="/code/app")+def test_filesystem_cwd():+ session = Session("Nodejs", cwd="/code/app")- await session.filesystem.write("hello.txt", "Hello VM!")- proc = await session.process.start("cat /code/app/hello.txt")- output = await proc+ session.filesystem.write("hello.txt", "Hello VM!")+ proc = session.process.start("cat /code/app/hello.txt")+ output = proc.wait()assert output.stdout == "Hello VM!"- await session.close()+ session.close()async def test_change_cwd():- session = await Session.create("Nodejs", cwd="/code/app")+ session = Session("Nodejs", cwd="/code/app")# change dir to /home/usersession.cwd = "/home/user"# process respects cwd- proc = await session.process.start("pwd")- output = await proc+ proc = session.process.start("pwd")+ output = proc.wait()assert output.stdout == "/home/user"# filesystem respects cwd- await session.filesystem.write("hello.txt", "Hello VM!")- proc = await session.process.start("cat /home/user/hello.txt")- output = await proc+ session.filesystem.write("hello.txt", "Hello VM!")+ proc = session.process.start("cat /home/user/hello.txt")+ output = proc.wait()assert output.stdout == "Hello VM!"- await session.close()+ session.close()async def test_initial_cwd_with_tilde():- session = await Session.create("Nodejs", cwd="~/code/")+ session = Session("Nodejs", cwd="~/code/")- proc = await session.process.start("pwd")- output = await proc+ proc = session.process.start("pwd")+ output = proc.wait()assert output.stdout == "/home/user/code"- await session.close()+ session.close()async def test_relative_paths():- session = await Session.create("Nodejs", cwd="/home/user")+ session = Session("Nodejs", cwd="/home/user")- await session.filesystem.make_dir("./code")- await session.filesystem.write("./code/hello.txt", "Hello Vasek!")- proc = await session.process.start("cat /home/user/code/hello.txt")- output = await proc+ session.filesystem.make_dir("./code")+ session.filesystem.write("./code/hello.txt", "Hello Vasek!")+ proc = session.process.start("cat /home/user/code/hello.txt")+ output = proc.wait()assert output.stdout == "Hello Vasek!"- await session.filesystem.write("../../hello.txt", "Hello Tom!")- proc = await session.process.start("cat /hello.txt")- output = await proc+ session.filesystem.write("../../hello.txt", "Hello Tom!")+ proc = session.process.start("cat /hello.txt")+ output = proc.wait()assert output.stdout == "Hello Tom!"- await session.close()+ session.close()async def test_warnings():- session = await Session.create("Nodejs")+ session = Session("Nodejs")with pytest.warns(Warning):- await session.filesystem.write("./hello.txt", "Hello Vasek!")+ session.filesystem.write("./hello.txt", "Hello Vasek!")with pytest.warns(Warning):- await session.filesystem.write("../hello.txt", "Hello Vasek!")+ session.filesystem.write("../hello.txt", "Hello Vasek!")with pytest.warns(Warning):- await session.filesystem.write("~/hello.txt", "Hello Vasek!")+ session.filesystem.write("~/hello.txt", "Hello Vasek!")- await session.close()+ session.close()diff --git a/packages/python-sdk/tests/test_env_vars.py b/packages/python-sdk/tests/test_env_vars.pyindex d40bed0fd..03f26cb61 100644--- a/packages/python-sdk/tests/test_env_vars.py+++ b/packages/python-sdk/tests/test_env_vars.py@@ -1,45 +1,45 @@from e2b import Session-async def test_env_vars():- session = await Session.create("Bash")+def test_env_vars():+ session = Session("Bash")- process = await session.process.start("echo $FOO", env_vars={"FOO": "BAR"})- await process+ process = session.process.start("echo $FOO", env_vars={"FOO": "BAR"})+ process.wait()output = process.stdoutassert output == "BAR"- await session.close()+ session.close()-async def test_profile_env_vars():- session = await Session.create("Bash")+def test_profile_env_vars():+ session = Session("Bash")- await session.filesystem.write("/home/user/.profile", "export FOO=BAR")- process = await session.process.start("echo $FOO")- await process+ session.filesystem.write("/home/user/.profile", "export FOO=BAR")+ process = session.process.start("echo $FOO")+ process.wait()output = process.stdoutassert output == "BAR"- await session.close()+ session.close()-async def test_default_env_vars():- session = await Session.create("Bash", env_vars={"FOO": "BAR"})- process = await session.process.start("echo $FOO")- await process+def test_default_env_vars():+ session = Session("Bash", env_vars={"FOO": "BAR"})+ process = session.process.start("echo $FOO")+ process.wait()output = process.stdoutassert output == "BAR"- await session.close()+ session.close()-async def test_overriding_env_vars():- session = await Session.create("Bash", env_vars={"FOO": "BAR"})+def test_overriding_env_vars():+ session = Session("Bash", env_vars={"FOO": "BAR"})- process = await session.process.start("echo $FOO", env_vars={"FOO": "QUX"})- await process+ process = session.process.start("echo $FOO", env_vars={"FOO": "QUX"})+ process.wait()output = process.stdoutassert output == "QUX"- await session.close()+ session.close()diff --git a/packages/python-sdk/tests/test_file_download.py b/packages/python-sdk/tests/test_file_download.pyindex 5044e4920..66e233e00 100644--- a/packages/python-sdk/tests/test_file_download.py+++ b/packages/python-sdk/tests/test_file_download.py@@ -1,14 +1,16 @@import filecmpfrom os import path+from e2b import Session-async def test_download():++def test_download():file_name = "video.webm"local_dir = "tests/assets"local_path = path.join(local_dir, file_name)- session = await Session.create("Nodejs")+ session = Session("Nodejs")# Upload the file first (it's uploaded to /home/user)with open(local_path, "rb") as f:@@ -16,11 +18,10 @@ async def test_download():# Download the file back and save it in the local filesystemfile_content = session.download_file(uploaded_file_path)- with open(path.join(local_dir, "video-downloaded.webm"), 'wb') as f:+ with open(path.join(local_dir, "video-downloaded.webm"), "wb") as f:f.write(file_content)-# Compare the downloaded file with the originalassert filecmp.cmp(local_path, path.join(local_dir, "video-downloaded.webm"))- await session.close()+ session.close()diff --git a/packages/python-sdk/tests/test_file_upload.py b/packages/python-sdk/tests/test_file_upload.pyindex f0b787ce9..c10acfc42 100644--- a/packages/python-sdk/tests/test_file_upload.py+++ b/packages/python-sdk/tests/test_file_upload.py@@ -1,16 +1,18 @@from os import path+from e2b import Session-async def test_file_upload():++def test_file_upload():file_name = "video.webm"local_dir = "tests/assets"filepath = path.join(local_dir, file_name)- session = await Session.create("Nodejs")+ session = Session("Nodejs")with open(filepath, "rb") as f:session.upload_file(file=f)- files = await session.filesystem.list("/home/user")+ files = session.filesystem.list("/home/user")assert file_name in [x.name for x in files]- await session.close()+ session.close()diff --git a/packages/python-sdk/tests/test_filesystem.py b/packages/python-sdk/tests/test_filesystem.pyindex aa821ddea..4390e8e0a 100644--- a/packages/python-sdk/tests/test_filesystem.py+++ b/packages/python-sdk/tests/test_filesystem.py@@ -1,71 +1,71 @@import filecmp-from asyncio import sleepfrom os import path+from time import sleepfrom typing import Listfrom e2b import Session, FilesystemEvent-async def test_list_files():- session = await Session.create("Nodejs")- await session.filesystem.make_dir("/test/new")+def test_list_files():+ session = Session("Nodejs")+ session.filesystem.make_dir("/test/new")- ls = await session.filesystem.list("/test")+ ls = session.filesystem.list("/test")assert ["new"] == [x.name for x in ls]- await session.close()+ session.close()-async def test_create_file():- session = await Session.create("Nodejs")- await session.filesystem.make_dir("/test")- await session.filesystem.write("/test/test.txt", "Hello World!")+def test_create_file():+ session = Session("Nodejs")+ session.filesystem.make_dir("/test")+ session.filesystem.write("/test/test.txt", "Hello World!")- ls = await session.filesystem.list("/test")+ ls = session.filesystem.list("/test")assert ["test.txt"] == [x.name for x in ls]- await session.close()+ session.close()-async def test_read_and_write():- session = await Session.create("Nodejs")+def test_read_and_write():+ session = Session("Nodejs")- await session.filesystem.write("/tmp/test.txt", "Hello World!")+ session.filesystem.write("/tmp/test.txt", "Hello World!")- content = await session.filesystem.read("/tmp/test.txt")+ content = session.filesystem.read("/tmp/test.txt")assert content == "Hello World!"- await session.close()+ session.close()-async def test_list_delete_files():- session = await Session.create("Nodejs")- await session.filesystem.make_dir("/test/new")+def test_list_delete_files():+ session = Session("Nodejs")+ session.filesystem.make_dir("/test/new")- ls = await session.filesystem.list("/test")+ ls = session.filesystem.list("/test")assert ["new"] == [x.name for x in ls]- await session.filesystem.remove("/test/new")+ session.filesystem.remove("/test/new")- ls = await session.filesystem.list("/test")+ ls = session.filesystem.list("/test")assert [] == [x.name for x in ls]- await session.close()+ session.close()-async def test_watch_dir():- session = await Session.create("Nodejs")- await session.filesystem.write("/tmp/test.txt", "Hello")+def test_watch_dir():+ session = Session("Nodejs")+ session.filesystem.write("/tmp/test.txt", "Hello")- watcher = await session.filesystem.watch_dir("/tmp")+ watcher = session.filesystem.watch_dir("/tmp")events: List[FilesystemEvent] = []watcher.add_event_listener(lambda e: events.append(e))- await watcher.start()- await session.filesystem.write("/tmp/test.txt", "World!")- await sleep(1)- await watcher.stop()+ watcher.start()+ session.filesystem.write("/tmp/test.txt", "World!")+ sleep(1)+ watcher.stop()assert len(events) >= 1@@ -73,10 +73,10 @@ async def test_watch_dir():assert event.operation == "Write"assert event.path == "/tmp/test.txt"- await session.close()+ session.close()-async def test_write_bytes():+def test_write_bytes():file_name = "video.webm"local_dir = "tests/assets"remote_dir = "/tmp"@@ -87,21 +87,21 @@ async def test_write_bytes():# TODO: This test isn't complete since we can't verify the size of the file inside session.# We don't have any SDK function to get the size of a file inside session.- session = await Session.create("Nodejs")+ session = Session("Nodejs")# Upload the filewith open(local_path, "rb") as f:content = f.read()- await session.filesystem.write_bytes(remote_path, content)+ session.filesystem.write_bytes(remote_path, content)# Check if the file exists inside session- files = await session.filesystem.list(remote_dir)+ files = session.filesystem.list(remote_dir)assert file_name in [x.name for x in files]- await session.close()+ session.close()-async def test_read_bytes():+def test_read_bytes():file_name = "video.webm"local_dir = "tests/assets"remote_dir = "/tmp"@@ -112,15 +112,15 @@ async def test_read_bytes():# TODO: This test isn't complete since we can't verify the size of the file inside session.# We don't have any SDK function to get the size of a file inside session.- session = await Session.create("Nodejs")+ session = Session("Nodejs")# Upload the file firstwith open(local_path, "rb") as f:content = f.read()- await session.filesystem.write_bytes(remote_path, content)+ session.filesystem.write_bytes(remote_path, content)# Download the file- content = await session.filesystem.read_bytes(remote_path)+ content = session.filesystem.read_bytes(remote_path)# Save the filedownloaded_path = path.join(local_dir, "video-downloaded.webm")@@ -130,4 +130,4 @@ async def test_read_bytes():# Compare if both files are equalassert filecmp.cmp(local_path, downloaded_path)- await session.close()+ session.close()diff --git a/packages/python-sdk/tests/test_process.py b/packages/python-sdk/tests/test_process.pyindex 5677da76d..a299e4be6 100644--- a/packages/python-sdk/tests/test_process.py+++ b/packages/python-sdk/tests/test_process.py@@ -3,30 +3,30 @@ from unittest.mock import MagicMockfrom e2b import Session-async def test_process_expected_stdout():+def test_process_expected_stdout():# TODO: Implement this once we fix envd stdout/stderr race conditionpass-async def test_process_expected_stderr():+def test_process_expected_stderr():# TODO: Implement this once we fix envd stdout/stderr race conditionpass-async def test_process_on_stdout_stderr():- session = await Session.create("Nodejs")+def test_process_on_stdout_stderr():+ session = Session("Nodejs")stdout = []stderr = []- proc = await session.process.start(+ proc = session.process.start("pwd",on_stdout=lambda data: stdout.append(data),on_stderr=lambda data: stderr.append(data),cwd="/tmp",)- output = await proc+ output = proc.wait()assert not output.errorassert output.stdout == "/tmp"@@ -35,34 +35,34 @@ async def test_process_on_stdout_stderr():assert stderr == []assert proc.exit_code == 0- await session.close()+ session.close()-async def test_process_on_exit():- session = await Session.create("Nodejs")+def test_process_on_exit():+ session = Session("Nodejs")on_exit = MagicMock()- proc = await session.process.start(+ proc = session.process.start("pwd",on_exit=lambda: on_exit(),)- await proc+ proc.wait()on_exit.assert_called_once()- await session.close()+ session.close()-async def test_process_send_stdin():- session = await Session.create("Nodejs")+def test_process_send_stdin():+ session = Session("Nodejs")- proc = await session.process.start(+ proc = session.process.start('read -r line; echo "$line"',cwd="/code",)- await proc.send_stdin("ping\n")- await proc+ proc.send_stdin("ping\n")+ proc.wait()assert proc.output.stdout == "ping"@@ -71,34 +71,34 @@ async def test_process_send_stdin():assert message.line == "ping"assert not message.error- await session.close()+ session.close()-async def test_default_on_exit():+def test_default_on_exit():on_exit = MagicMock()- session = await Session.create("Nodejs", on_exit=lambda: on_exit())- proc = await session.process.start(+ session = Session("Nodejs", on_exit=lambda: on_exit())+ proc = session.process.start("pwd",on_exit=lambda: print("EXIT"),)- await proc+ proc.wait()on_exit.assert_not_called()- proc = await session.process.start(+ proc = session.process.start("pwd",)- await proc+ proc.wait()on_exit.assert_called_once()- await session.close()+ session.close()-async def test_process_default_on_stdout_stderr():+def test_process_default_on_stdout_stderr():on_stdout = MagicMock()on_stderr = MagicMock()- session = await Session.create(+ session = Session("Nodejs",on_stdout=lambda data: on_stdout(),on_stderr=lambda data: on_stderr(),@@ -108,21 +108,21 @@ async def test_process_default_on_stdout_stderr():stdout = []stderr = []- proc = await session.process.start(+ proc = session.process.start(code,on_stdout=lambda data: stdout.append(data),on_stderr=lambda data: stderr.append(data),)- await proc+ proc.wait()on_stdout.assert_not_called()on_stderr.assert_not_called()- proc = await session.process.start(code)- await proc+ proc = session.process.start(code)+ proc.wait()on_stdout.assert_called_once()on_stderr.assert_called()assert proc.exit_code == 1- await session.close()+ session.close()diff --git a/packages/python-sdk/tests/test_run_code.py b/packages/python-sdk/tests/test_run_code.pyindex 5407cfd70..b87852bdb 100644--- a/packages/python-sdk/tests/test_run_code.py+++ b/packages/python-sdk/tests/test_run_code.py@@ -4,15 +4,15 @@ from e2b import run_codefrom e2b.session.exception import UnsupportedRuntimeException-async def test_run_code():+def test_run_code():code = "console.log('hello\\n'.repeat(10)); throw new Error('error')"- stdout, stderr = await run_code("Node16", code)+ stdout, stderr = run_code("Node16", code)assert len(stdout) == 60assert "Error: error" in stderr-async def test_unsupported_runtime():+def test_unsupported_runtime():code = "console.log('hello'); throw new Error('error')"with pytest.raises(UnsupportedRuntimeException) as e:- await run_code("unsupported", code)+ run_code("unsupported", code)diff --git a/packages/python-sdk/tests/test_session.py b/packages/python-sdk/tests/test_session.pyindex 433b57f8a..1ce3d7519 100644--- a/packages/python-sdk/tests/test_session.py+++ b/packages/python-sdk/tests/test_session.py@@ -1,13 +1,13 @@from e2b import Session-async def test_create_session():- session = await Session.create("Nodejs")- await session.close()+def test_create_session():+ session = Session("Nodejs")+ session.close()-async def test_create_multiple_sessions():- session = await Session.create("Nodejs")- session2 = await Session.create("Nodejs")- await session.close()- await session2.close()+def test_create_multiple_sessions():+ session = Session("Nodejs")+ session2 = Session("Nodejs")+ session.close()+ session2.close()diff --git a/packages/python-sdk/tests/test_sync.py b/packages/python-sdk/tests/test_sync.pydeleted file mode 100644index 5794b409b..000000000--- a/packages/python-sdk/tests/test_sync.py+++ /dev/null@@ -1,135 +0,0 @@-import asyncio-from typing import List-from unittest.mock import MagicMock--from e2b import SyncSession, FilesystemEvent---def test_process_on_stdout_stderr():- session = SyncSession.create("Nodejs")-- stdout = []- stderr = []-- proc = session.process.start(- "pwd",- on_stdout=lambda data: stdout.append(data),- on_stderr=lambda data: stderr.append(data),- cwd="/tmp",- )-- output = proc.wait()-- assert not output.error- assert output.stdout == "/tmp"- assert output.stderr == ""- assert list(map(lambda message: message.line, stdout)) == ["/tmp"]- assert stderr == []-- session.close()---def test_process_on_exit():- session = SyncSession.create("Nodejs")-- on_exit = MagicMock()-- proc = session.process.start(- "pwd",- on_exit=lambda: on_exit(),- )-- proc.wait()- on_exit.assert_called_once()-- session.close()---def test_process_send_stdin():- session = SyncSession.create("Nodejs")-- proc = session.process.start(- 'read -r line; echo "$line"',- cwd="/code",- )- proc.send_stdin("ping\n")- proc.wait()-- assert proc.output.stdout == "ping"-- assert len(proc.output_messages) == 1- message = proc.output_messages[0]- assert message.line == "ping"- assert not message.error-- session.close()---def test_list_files():- session = SyncSession.create("Nodejs")- session.filesystem.make_dir("/test/new")-- ls = session.filesystem.list("/test")- assert ["new"] == [x.name for x in ls]-- session.close()---def test_create_file():- session = SyncSession.create("Nodejs")- session.filesystem.make_dir("/test")- session.filesystem.write("/test/test.txt", "Hello World!")-- ls = session.filesystem.list("/test")- assert ["test.txt"] == [x.name for x in ls]-- session.close()---def test_read_and_write():- session = SyncSession.create("Nodejs")-- session.filesystem.write("/tmp/test.txt", "Hello World!")-- content = session.filesystem.read("/tmp/test.txt")- assert content == "Hello World!"-- session.close()---def test_list_delete_files():- session = SyncSession.create("Nodejs")- session.filesystem.make_dir("/test/new")-- ls = session.filesystem.list("/test")- assert ["new"] == [x.name for x in ls]-- session.filesystem.remove("/test/new")-- ls = session.filesystem.list("/test")- assert [] == [x.name for x in ls]-- session.close()---def test_watch_dir():- session = SyncSession.create("Nodejs")- session.filesystem.write("/tmp/test.txt", "Hello")-- watcher = session.filesystem.watch_dir("/tmp")-- events: List[FilesystemEvent] = []- watcher.add_event_listener(lambda e: events.append(e))-- watcher.start()- session.filesystem.write("/tmp/test.txt", "World!")- session._loop.run_until_complete(asyncio.sleep(1))- watcher.stop()-- assert len(events) >= 1-- event = events[0]- assert event.operation == "Write"- assert event.path == "/tmp/test.txt"-- session.close()diff --git a/packages/python-sdk/tests/test_timeout.py b/packages/python-sdk/tests/test_timeout.pyindex 0b728d102..c41aa93d8 100644--- a/packages/python-sdk/tests/test_timeout.py+++ b/packages/python-sdk/tests/test_timeout.py@@ -1,31 +1,30 @@-import asyncio-import pytestfrom e2b import Session+from e2b.session.exception import TimeoutException-async def test_create_session_timeout():- with pytest.raises(asyncio.TimeoutError):- await Session.create("Nodejs", timeout=0.01)+def test_create_session_timeout():+ with pytest.raises(TimeoutException):+ Session("Nodejs", timeout=0.01)-async def test_process_timeout():- with pytest.raises(asyncio.TimeoutError):- session = await Session.create("Nodejs")- await session.process.start(+def test_process_timeout():+ with pytest.raises(TimeoutException):+ session = Session("Nodejs")+ session.process.start("sleep 1",timeout=0.01,)- await session.close()+ session.close()-async def test_filesystem_timeout():- with pytest.raises(asyncio.TimeoutError):- session = await Session.create("Nodejs")- await session.filesystem.write(+def test_filesystem_timeout():+ with pytest.raises(TimeoutException):+ session = Session("Nodejs")+ session.filesystem.write("test.txt","Hello World",timeout=0.01,)- await session.close()+ session.close()