Shroominic commited on
Commit
053c1a1
·
1 Parent(s): 5676d16

🏃 is_running check

Browse files
Files changed (1) hide show
  1. codeinterpreterapi/session.py +3 -0
codeinterpreterapi/session.py CHANGED
@@ -183,6 +183,9 @@ class CodeInterpreterSession:
183
  "Please try again or restart the session."
184
  )
185
 
 
 
 
186
  async def astop(self) -> None:
187
  await self.codebox.astop()
188
 
 
183
  "Please try again or restart the session."
184
  )
185
 
186
+ async def is_running(self) -> bool:
187
+ return await self.codebox.astatus() == "running"
188
+
189
  async def astop(self) -> None:
190
  await self.codebox.astop()
191