Query
Provides an interactive query builder for Notion databases.
CheckboxCondition
Bases:
Represents checkbox criteria in Notion.
Source code in src/notional/query.py
44 45 46 47 48 |
|
CompoundFilter
Bases:
Represents a compound filter in Notion.
Source code in src/notional/query.py
189 190 191 192 193 194 195 196 197 198 |
|
Config
Pydantic configuration class to support keyword fields.
Source code in src/notional/query.py
192 193 194 195 |
|
CreatedTimeFilter
Bases:
Represents a created_time filter in Notion.
Source code in src/notional/query.py
165 166 167 168 169 170 171 172 173 174 |
|
__compose__(value)
classmethod
Create a new CreatedTimeFilter
using the given constraint.
Source code in src/notional/query.py
171 172 173 174 |
|
DateCondition
Bases:
Represents date criteria in Notion.
Source code in src/notional/query.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
FilesCondition
Bases:
Represents files criteria in Notion.
Source code in src/notional/query.py
98 99 100 101 102 |
|
FormulaCondition
Bases:
Represents formula criteria in Notion.
Source code in src/notional/query.py
114 115 116 117 118 119 120 |
|
LastEditedTimeFilter
Bases:
Represents a last_edited_time filter in Notion.
Source code in src/notional/query.py
177 178 179 180 181 182 183 184 185 186 |
|
__compose__(value)
classmethod
Create a new LastEditedTimeFilter
using the given constraint.
Source code in src/notional/query.py
183 184 185 186 |
|
MultiSelectCondition
Bases:
Represents a multi_select criteria in Notion.
Source code in src/notional/query.py
60 61 62 63 64 65 66 |
|
NumberCondition
Bases:
Represents number criteria in Notion.
Source code in src/notional/query.py
31 32 33 34 35 36 37 38 39 40 41 |
|
PeopleCondition
Bases:
Represents people criteria in Notion.
Source code in src/notional/query.py
89 90 91 92 93 94 95 |
|
PropertyFilter
Bases:
Represents a database property filter in Notion.
Source code in src/notional/query.py
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
|
PropertySort
Bases:
Represents a sort instruction in Notion.
Source code in src/notional/query.py
208 209 210 211 212 213 |
|
Query
Bases:
Represents a query object in Notion.
Source code in src/notional/query.py
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
|
valid_page_size(value)
Validate that the given page size meets the Notion API requirements.
Source code in src/notional/query.py
224 225 226 227 228 229 230 231 |
|
QueryBuilder
A query builder for the Notion API.
:param endpoint: the session endpoint used to execute the query :param datatype: an optional class to capture results :param params: optional params that will be passed to the query
Source code in src/notional/query.py
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
|
__init__(endpoint, datatype=None, **params)
Initialize a new QueryBuilder
for the given endpoint.
Source code in src/notional/query.py
242 243 244 245 246 247 248 249 |
|
execute()
Execute the current query and return an iterator for the results.
Source code in src/notional/query.py
320 321 322 323 324 325 326 327 328 329 330 331 332 333 |
|
filter(filter=None, **kwargs)
Add the given filter to the query.
Source code in src/notional/query.py
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 |
|
first()
Execute the current query and return the first result only.
Source code in src/notional/query.py
335 336 337 338 339 340 341 342 343 |
|
limit(count)
Limit the number of results to the given count.
Source code in src/notional/query.py
313 314 315 316 317 318 |
|
sort(sort=None, **kwargs)
Add the given sort elements to the query.
Source code in src/notional/query.py
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
|
start_at(page_id)
Set the start cursor to a specific page ID.
Source code in src/notional/query.py
306 307 308 309 310 311 |
|
QueryFilter
Bases:
Base class for query filters.
Source code in src/notional/query.py
123 124 |
|
RelationCondition
Bases:
Represents relation criteria in Notion.
Source code in src/notional/query.py
105 106 107 108 109 110 111 |
|
SearchFilter
Bases:
Represents a search property filter in Notion.
Source code in src/notional/query.py
145 146 147 148 149 |
|
SelectCondition
Bases:
Represents select criteria in Notion.
Source code in src/notional/query.py
51 52 53 54 55 56 57 |
|
SortDirection
Bases:
,
Sort direction options.
Source code in src/notional/query.py
201 202 203 204 205 |
|
TextCondition
Bases:
Represents text criteria in Notion.
Source code in src/notional/query.py
18 19 20 21 22 23 24 25 26 27 28 |
|
TimestampFilter
Bases:
Represents a timestamp filter in Notion.
Source code in src/notional/query.py
159 160 161 162 |
|
TimestampKind
Bases:
,
Possible timestamp types.
Source code in src/notional/query.py
152 153 154 155 156 |
|