File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,17 @@ This page lists changes to Flare's API.
1212Release notes for the Flare Platform can be found on the [ product documentation website] ( https://docs.flare.io/releases ) .
1313</Note >
1414
15+ <Update label = " 2025-05-15" description = " Python SDK - v1.2.0" >
16+ Released version 1.2.0 of the
17+ [ Python SDK <Icon icon = " book" size = { 16 } />] ( /sdk/python ) .
18+
19+ This release adds a new ` scroll_events ` method that can be used to retrieve events from the feed APIs
20+ without having to manage fetching events individually.
21+
22+ More information, including full examples, can be found in the
23+ [ Python SDK documentation <Icon icon = " book" size = { 16 } />] ( /sdk/python ) .
24+ </Update >
25+
1526<Update label = " 2025-11" description = " API - November 2025" >
1627 Added a [ Global Search Credentials Endpoint <Icon icon = " code" size = { 16 } />] ( /api-reference/v4/endpoints/credentials-global-search ) .
1728 This new endpoint allows for searching in all of Flare's credentials and counts towards the Global Search quota.
Original file line number Diff line number Diff line change @@ -102,6 +102,45 @@ for resp in api_client.scroll(
102102print (" The last value for 'next' was" , last_from)
103103```
104104
105+ ## Paging utils with details
106+
107+ The ` FlareApiClient ` has a ` scroll_events ` method that can be used with event feeds endpoints.
108+ The advantage of this method over ` scroll ` is that it also automates the fetching of individual events.
109+
110+ ``` python Paging Util Example - With Details
111+ import datetime
112+
113+ from flareio import FlareApiClient
114+
115+
116+ api_client = FlareApiClient.from_env()
117+
118+ from_timestamp: str = (
119+ datetime.datetime.now(tz = datetime.timezone.utc) - datetime.timedelta(hours = 1 )
120+ ).isoformat()
121+
122+ for event, next in api_client.scroll_events(
123+ method = " POST" ,
124+ pages_url = " /firework/v4/events/global/_search" ,
125+ events_url = " /firework/v2/activities/" ,
126+ json = {
127+ " size" : 10 ,
128+ " order" : " asc" ,
129+ " from" : last_from,
130+ " filters" : {
131+ " type" : [" chat_message" ],
132+ " estimated_created_at" : {" gte" : from_timestamp},
133+ },
134+ " query" : {
135+ " type" : " query_string" ,
136+ " query_string" : " hello" ,
137+ },
138+ },
139+ ):
140+ print (f " Full event data: { event} " )
141+ print (f " The next execution could resume using from= { next } " )
142+ ```
143+
105144## Custom Session
106145
107146The ` FlareApiClient ` can be initialized with a custom ` requests.Session ` . This allows, for example,
You can’t perform that action at this time.
0 commit comments