@@ -25,6 +25,7 @@ class AuditLog(object):
2525 --------
2626 :meth:`AuditLogsManager.list_audit_logs`
2727 :attr:`AuditLogsManager.audit_logs`
28+
2829 """
2930
3031 def __init__ (
@@ -107,6 +108,7 @@ def from_dict(cls, obj: Dict[str, Any]) -> 'AuditLog':
107108 Returns
108109 -------
109110 :class:`AuditLog`
111+
110112 """
111113 return cls (
112114 log_id = obj ['logID' ],
@@ -141,6 +143,7 @@ class AuditLogsManager(Manager):
141143 Version of the API to use
142144 base_url : str, optional
143145 Base URL of the management API
146+
144147 """
145148
146149 #: Object type
@@ -196,11 +199,12 @@ def list_audit_logs(
196199 ... )
197200 >>> for log in logs:
198201 ... print(f"{log.timestamp}: {log.action} by {log.user_email}")
199-
202+ >>>
200203 >>> # Filter by time range
201204 >>> import datetime
202205 >>> start = datetime.datetime.now() - datetime.timedelta(days=7)
203206 >>> recent_logs = audit_mgr.list_audit_logs(start_time=start)
207+
204208 """
205209 params = {}
206210
@@ -262,6 +266,7 @@ def get_audit_logs_for_user(
262266 >>> audit_mgr = singlestoredb.manage_audit_logs()
263267 >>> user_logs = audit_mgr.get_audit_logs_for_user("user-123")
264268 >>> print(f"Found {len(user_logs)} log entries for user")
269+
265270 """
266271 return self .list_audit_logs (
267272 user_id = user_id ,
@@ -306,6 +311,7 @@ def get_audit_logs_for_resource(
306311 ... "workspace", "ws-123"
307312 ... )
308313 >>> print(f"Found {len(workspace_logs)} log entries for workspace")
314+
309315 """
310316 return self .list_audit_logs (
311317 resource_type = resource_type ,
@@ -344,6 +350,7 @@ def get_failed_actions(
344350 >>> failed_logs = audit_mgr.get_failed_actions(limit=50)
345351 >>> for log in failed_logs:
346352 ... print(f"{log.timestamp}: {log.action} failed - {log.error_message}")
353+
347354 """
348355 return self .list_audit_logs (
349356 success = False ,
@@ -383,6 +390,7 @@ def get_actions_by_type(
383390 >>> audit_mgr = singlestoredb.manage_audit_logs()
384391 >>> create_logs = audit_mgr.get_actions_by_type("CREATE_WORKSPACE")
385392 >>> print(f"Found {len(create_logs)} workspace creation events")
393+
386394 """
387395 return self .list_audit_logs (
388396 action = action ,
@@ -423,6 +431,7 @@ def manage_audit_logs(
423431 >>> audit_mgr = s2.manage_audit_logs()
424432 >>> logs = audit_mgr.audit_logs
425433 >>> print(f"Found {len(logs)} recent audit log entries")
434+
426435 """
427436 return AuditLogsManager (
428437 access_token = access_token ,
0 commit comments