Transactions offset in Dazl library
App Development2 posts221 views1 likesLast activity Nov 2022
YE
Yevhenii_PotapenkoOP
Nov 2022Hi
We are trying to build a python integration that will be working with the transactions service. Is there a way how we can pass the offset of the transactions in Dazl library?
I went through the documentation of Dazl library and didn’t find any related information
DT
dtanabe
Nov 2022Answered here with respect to offsets:
.stream() takes an offset parameter, so you can simply pass that: async with conn.stream(offset="...") as stream: async for event in stream.creates(): ... But because you’d need to also get offsets, you’d need to use a slightly different API: async with conn.stream(offset="...") as stream: async for event in stream: if isinstance(event, CreateEvent): ... elif isinstance(event, Boundary): # remember this offset somehow ... =…
You’re right that it’s not in the docs; we’ll update the docs for the latest version of the library. Sorry about that!