@@ -689,6 +689,9 @@ def batches(self, **kwargs) -> Batchlist:
689
689
The maximum value of `created_at` in UTC timezone
690
690
ISO format: 'YYYY-MM-DD HH:MM:SS.mmmmmm'
691
691
692
+ exclude_archived (bool):
693
+ A flag to exclude archived batches if True
694
+
692
695
status (str):
693
696
Status to filter batches by
694
697
@@ -710,6 +713,7 @@ def batches(self, **kwargs) -> Batchlist:
710
713
allowed_kwargs = {
711
714
"start_time" ,
712
715
"end_time" ,
716
+ "exclude_archived" ,
713
717
"status" ,
714
718
"project" ,
715
719
"limit" ,
@@ -739,6 +743,7 @@ def get_batches(
739
743
batch_status : BatchStatus = None ,
740
744
created_after : str = None ,
741
745
created_before : str = None ,
746
+ exclude_archived : bool = False ,
742
747
) -> Generator [Batch , None , None ]:
743
748
"""`Generator` method to yield all batches with the given
744
749
parameters.
@@ -761,6 +766,9 @@ def get_batches(
761
766
The maximum value of `created_at` in UTC timezone
762
767
ISO format: 'YYYY-MM-DD HH:MM:SS.mmmmmm'
763
768
769
+ exclude_archived (bool):
770
+ A flag to exclude archived batches if True
771
+
764
772
Yields:
765
773
Generator[Batch]:
766
774
Yields Batch, can be iterated.
@@ -775,6 +783,7 @@ def get_batches(
775
783
"end_time" : created_before ,
776
784
"project" : project_name ,
777
785
"offset" : offset ,
786
+ "exclude_archived" : exclude_archived ,
778
787
}
779
788
780
789
if batch_status :
0 commit comments