Coverage for src/fluree_py/http/protocol/endpoint/history.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.8.0, created at 2025-04-02 03:03 +0000

1"""Protocols and types for querying historical data in the Fluree ledger.""" 

2 

3from typing import Protocol, Self 

4 

5from fluree_py.http.protocol.mixin import ( 

6 SupportsCommitable, 

7 SupportsContext, 

8 SupportsRequestCreation, 

9) 

10from fluree_py.types.common import TimeClause 

11from fluree_py.types.http.history import HistoryClause 

12 

13 

14class HistoryBuilder( 

15 SupportsContext["HistoryBuilder"], 

16 SupportsRequestCreation, 

17 SupportsCommitable, 

18 Protocol, 

19): 

20 """Protocol for history builders.""" 

21 

22 def with_history(self, history: HistoryClause) -> Self: ... 

23 def with_t(self, t: TimeClause) -> Self: ... 

24 def with_commit_details(self, commit_details: bool) -> Self: ...