@@ -147,7 +147,7 @@ def user_search(self, query: str) -> UserSearchResult:
147147 'created': 1756056224470,
148148 'email_address_verified': None}]
149149 """
150- ...
150+ ... # pragma: no cover
151151
152152
153153class Projects :
@@ -246,7 +246,7 @@ def add_collaborator(self, project_id: str | list[str], account_id: str | list[s
246246 Returns:
247247 dict[str, Any]: JSON response from the API.
248248 """
249- ...
249+ ... # pragma: no cover
250250
251251 @api_method ("projects.removeCollaborator" , opts = True )
252252 def remove_collaborator (self , project_id : str , account_id : str ) -> dict [str , Any ]:
@@ -260,7 +260,7 @@ def remove_collaborator(self, project_id: str, account_id: str) -> dict[str, Any
260260 Returns:
261261 dict[str, Any]: JSON response from the API.
262262 """
263- ...
263+ ... # pragma: no cover
264264
265265 @api_method ("projects.start" )
266266 def start (self , project_id : str ) -> dict [str , Any ]:
@@ -295,6 +295,55 @@ def delete(self, project_id: str) -> dict[str, Any]:
295295 """
296296 ...
297297
298+ @api_method ("projects.touch" )
299+ def touch (self , project_id : str ) -> dict [str , Any ]:
300+ """
301+ Signal that the project is in use by updating its last_edited timestamp.
302+ This also ensures the project is started.
303+
304+ Args:
305+ project_id (str): Project ID of the project to touch.
306+
307+ Returns:
308+ dict[str, Any]: API response indicating success.
309+ """
310+ ...
311+
312+ @api_method ("projects.state" )
313+ def state (self , project_id : str ) -> dict [str , Any ]:
314+ """
315+ Get the current state of a project (running, stopped, starting, etc.).
316+
317+ Args:
318+ project_id (str): Project ID of the project.
319+
320+ Returns:
321+ dict[str, Any]: Project state object containing:
322+ - state: "running" | "stopped" | "starting" | "restarting" | "error"
323+ - ip: IP address where project is running (if running)
324+ - error: Error message (if in error state)
325+ - time: Timestamp of last state change
326+ """
327+ ...
328+
329+ @api_method ("projects.status" )
330+ def status (self , project_id : str ) -> dict [str , Any ]:
331+ """
332+ Get detailed status information about a project.
333+
334+ Args:
335+ project_id (str): Project ID of the project.
336+
337+ Returns:
338+ dict[str, Any]: Project status object containing:
339+ - project.pid: PID of project server process
340+ - start_ts: Timestamp when project started
341+ - version: Project code version
342+ - disk_MB: Disk usage in MB
343+ - memory: Memory usage information
344+ """
345+ ...
346+
298347
299348class Jupyter :
300349
@@ -324,7 +373,7 @@ def kernels(self, project_id: Optional[str] = None) -> list[dict[str, Any]]:
324373 >>> 'python3' in kernel_names
325374 True
326375 """
327- ...
376+ ... # pragma: no cover
328377
329378 @api_method ("jupyter.execute" , timeout_seconds = True )
330379 def execute (
@@ -365,7 +414,7 @@ def execute(
365414 ... project_id='6e75dbf1-0342-4249-9dce-6b21648656e9')
366415 {'output': [{'data': {'text/plain': '3^4 * 5^2'}}], ...}
367416 """
368- ...
417+ ... # pragma: no cover
369418
370419
371420class Sync :
@@ -385,7 +434,7 @@ def history(self, project_id: str, path: str) -> list[dict[str, Any]]: # type:
385434 Returns:
386435 list[dict[str, Any]]: Array of patches in a compressed diff-match-patch format, along with time and user data.
387436 """
388- ...
437+ ... # pragma: no cover
389438
390439
391440class Database :
@@ -420,7 +469,7 @@ def query(self, query: dict[str, Any]) -> dict[str, Any]:
420469 >>> hub.db.query({"accounts":{"first_name":None}})
421470 {'accounts': {'first_name': 'W'}}
422471 """
423- ...
472+ ... # pragma: no cover
424473
425474
426475class Messages :
@@ -442,7 +491,7 @@ def send(self, subject: str, body: str, to_ids: list[str], reply_id: Optional[in
442491 Returns:
443492 int: ID of the message.
444493 """
445- ...
494+ ... # pragma: no cover
446495
447496 @api_method ("messages.get" )
448497 def get (
@@ -462,7 +511,7 @@ def get(
462511 Returns:
463512 list[MessageType]: List of messages.
464513 """
465- ...
514+ ... # pragma: no cover
466515
467516
468517"""
0 commit comments