@@ -689,6 +689,9 @@ def batches(self, **kwargs) -> Batchlist:
689689 The maximum value of `created_at` in UTC timezone
690690 ISO format: 'YYYY-MM-DD HH:MM:SS.mmmmmm'
691691
692+ exclude_archived (bool):
693+ A flag to exclude archived batches if True
694+
692695 status (str):
693696 Status to filter batches by
694697
@@ -710,6 +713,7 @@ def batches(self, **kwargs) -> Batchlist:
710713 allowed_kwargs = {
711714 "start_time" ,
712715 "end_time" ,
716+ "exclude_archived" ,
713717 "status" ,
714718 "project" ,
715719 "limit" ,
@@ -739,6 +743,7 @@ def get_batches(
739743 batch_status : BatchStatus = None ,
740744 created_after : str = None ,
741745 created_before : str = None ,
746+ exclude_archived : bool = False ,
742747 ) -> Generator [Batch , None , None ]:
743748 """`Generator` method to yield all batches with the given
744749 parameters.
@@ -761,6 +766,9 @@ def get_batches(
761766 The maximum value of `created_at` in UTC timezone
762767 ISO format: 'YYYY-MM-DD HH:MM:SS.mmmmmm'
763768
769+ exclude_archived (bool):
770+ A flag to exclude archived batches if True
771+
764772 Yields:
765773 Generator[Batch]:
766774 Yields Batch, can be iterated.
@@ -775,6 +783,7 @@ def get_batches(
775783 "end_time" : created_before ,
776784 "project" : project_name ,
777785 "offset" : offset ,
786+ "exclude_archived" : exclude_archived ,
778787 }
779788
780789 if batch_status :
0 commit comments