swimlane.core.resources.report module¶
- class swimlane.core.resources.report.Report(*args, **kwargs)[source]¶
Bases:
APIResource
,PaginatedCursor
A report class used for searching
Can be iterated over to retrieve results
Notes
Record retrieval is lazily evaluated and cached internally, adding a filter and attempting to iterate again will not respect the additional filter and will return the same set of records each time
Examples
Lazy retrieval of records with direct iteration over report
report = app.reports.build('new-report') report.filter('field_1', 'equals', 'value') for record in report: do_thing(record)
Full immediate retrieval of all records
report = app.reports.build('new-report') report.filter('field_1', 'doesNotEqual', 'value') records = list(report)
- Keyword Arguments:
- default_limit = 50¶
- filter(field_name, operand, value)[source]¶
Adds a filter to report
Notes
All filters are currently AND’ed together.
None values work like a wildcard and will skip type verification.
- set_columns(*field_names)[source]¶
Set specified columns for report
Notes
The Tracking Id column is always included
- Parameters:
*field_names (str) – Zero or more column names