1
+
2
+
3
+ <!DOCTYPE html>
4
+ < html class ="writer-html5 " lang ="en " >
5
+ < head >
6
+ < meta charset ="utf-8 " />
7
+
8
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
9
+
10
+ < title > Query for Document Report — Indico Python Client 3.1.0 documentation</ title >
11
+
12
+
13
+
14
+ < link rel ="stylesheet " href ="_static/css/indicotheme.css " type ="text/css " />
15
+ < link rel ="stylesheet " href ="_static/pygments.css " type ="text/css " />
16
+ < link rel ="stylesheet " href ="_static/pygments.css " type ="text/css " />
17
+ < link rel ="stylesheet " href ="_static/css/indicotheme.css " type ="text/css " />
18
+
19
+
20
+
21
+ < link rel ="shortcut icon " href ="_static/favicon.png "/>
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+ <!--[if lt IE 9]>
31
+ <script src="_static/js/html5shiv.min.js"></script>
32
+ <![endif]-->
33
+
34
+
35
+ < script type ="text/javascript " id ="documentation_options " data-url_root ="./ " src ="_static/documentation_options.js "> </ script >
36
+ < script data-url_root ="./ " id ="documentation_options " src ="_static/documentation_options.js "> </ script >
37
+ < script src ="_static/jquery.js "> </ script >
38
+ < script src ="_static/underscore.js "> </ script >
39
+ < script src ="_static/doctools.js "> </ script >
40
+
41
+ < script type ="text/javascript " src ="_static/js/theme.js "> </ script >
42
+
43
+
44
+ < link rel ="index " title ="Index " href ="genindex.html " />
45
+ < link rel ="search " title ="Search " href ="search.html " />
46
+ < link rel ="next " title ="IndicoConfig " href ="config.html " />
47
+ < link rel ="prev " title ="Fetching Workflow Metrics " href ="workflow-metrics-ex.html " />
48
+ </ head >
49
+
50
+ < body class ="wy-body-for-nav ">
51
+
52
+
53
+ < div class ="wy-grid-for-nav ">
54
+
55
+ < nav data-toggle ="wy-nav-shift " class ="wy-nav-side ">
56
+ < div class ="wy-side-scroll ">
57
+ < div class ="wy-side-nav-search " style ="background: linear-gradient(to right top,#2c4658,#2f5f76,#2b7992,#2094ad,#04b1c6) " >
58
+
59
+
60
+
61
+ < a href ="index.html " class ="icon icon-home "> Indico Python Client
62
+
63
+
64
+
65
+
66
+ < img src ="_static/logo-white.png " class ="logo " alt ="Logo "/>
67
+
68
+ </ a >
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+ < div role ="search ">
77
+ < form id ="rtd-search-form " class ="wy-form " action ="search.html " method ="get ">
78
+ < input type ="text " name ="q " placeholder ="Search docs " />
79
+ < input type ="hidden " name ="check_keywords " value ="yes " />
80
+ < input type ="hidden " name ="area " value ="default " />
81
+ </ form >
82
+ </ div >
83
+
84
+
85
+ </ div >
86
+
87
+
88
+ < div class ="wy-menu wy-menu-vertical " data-spy ="affix " role ="navigation " aria-label ="main navigation ">
89
+
90
+
91
+
92
+
93
+
94
+
95
+ < ul class ="current ">
96
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="intro.html "> Getting Started</ a > </ li >
97
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="concepts.html "> Key Concepts and Terminology</ a > </ li >
98
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="docextract-intro.html "> OCR With DocumentExtraction</ a > </ li >
99
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="docextract_settings.html "> DocumentExtraction Settings</ a > </ li >
100
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="model_predictions.html "> Generating Model Predictions</ a > </ li >
101
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="workflow-intro.html "> Workflows</ a > </ li >
102
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="review-intro.html "> Review</ a > </ li >
103
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="auto-review.html "> Auto Review</ a > </ li >
104
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="object-detection.html "> Object Detection</ a > </ li >
105
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="migration.html "> Migrating Client Library Scripts</ a > </ li >
106
+ < li class ="toctree-l1 current "> < a class ="reference internal " href ="examples.html "> Examples</ a > < ul class ="current ">
107
+ < li class ="toctree-l2 "> < a class ="reference internal " href ="graphql-ex.html "> Simple GraphQL Query Example</ a > </ li >
108
+ < li class ="toctree-l2 "> < a class ="reference internal " href ="train-predict-ex.html "> Train a Classifier and Predict</ a > </ li >
109
+ < li class ="toctree-l2 "> < a class ="reference internal " href ="singleocr-ex.html "> OCR a Single File with DocumentExtraction</ a > </ li >
110
+ < li class ="toctree-l2 "> < a class ="reference internal " href ="training-progress.html "> Check Model Training Progress</ a > </ li >
111
+ < li class ="toctree-l2 "> < a class ="reference internal " href ="workflow-ex.html "> Run Files Through a Workflow</ a > </ li >
112
+ < li class ="toctree-l2 "> < a class ="reference internal " href ="ocr-object-parse-ex.html "> Parsing the OCR result at the document, page, and block levels</ a > </ li >
113
+ < li class ="toctree-l2 "> < a class ="reference internal " href ="image-dataset-ex.html "> Created a Dataset from Local Images</ a > </ li >
114
+ < li class ="toctree-l2 "> < a class ="reference internal " href ="image-predictions-ex.html "> Get Predictions from Image Model</ a > </ li >
115
+ < li class ="toctree-l2 "> < a class ="reference internal " href ="submission-ex.html "> Sending New Samples to a Workflow (aka Workflow Submission)</ a > </ li >
116
+ < li class ="toctree-l2 "> < a class ="reference internal " href ="user-metrics-ex.html "> Fetching User Metrics</ a > </ li >
117
+ < li class ="toctree-l2 "> < a class ="reference internal " href ="workflow-metrics-ex.html "> Fetching Workflow Metrics</ a > </ li >
118
+ < li class ="toctree-l2 current "> < a class ="current reference internal " href ="# "> Query for Document Report</ a > </ li >
119
+ </ ul >
120
+ </ li >
121
+ </ ul >
122
+ < ul >
123
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="config.html "> IndicoConfig</ a > </ li >
124
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="client.html "> IndicoClient</ a > </ li >
125
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="docextract.html "> DocumentExtraction</ a > </ li >
126
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="datasets.html "> Datasets</ a > </ li >
127
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="model_groups.html "> Model Groups</ a > </ li >
128
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="jobs.html "> Jobs and Job Status</ a > </ li >
129
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="submissions.html "> Submissions</ a > </ li >
130
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="storage.html "> Storage</ a > </ li >
131
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="workflow.html "> Workflows</ a > </ li >
132
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="exports.html "> Exports</ a > </ li >
133
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="filters.html "> Filters</ a > </ li >
134
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="graphql_queries.html "> Common GraphQL Queries</ a > </ li >
135
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="user_metrics.html "> User Metrics</ a > </ li >
136
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="workflow-metrics.html "> Workflow Metrics</ a > </ li >
137
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="document_report.html "> Document Report Metrics</ a > </ li >
138
+ </ ul >
139
+ < ul >
140
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="dataset-type.html "> Dataset Types</ a > </ li >
141
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="jobs-type.html "> Jobs Types</ a > </ li >
142
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="model-group-type.html "> Model Group Types</ a > </ li >
143
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="model-type.html "> Model Types</ a > </ li >
144
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="user-metrics-types.html "> User Metrics Types</ a > </ li >
145
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="workflow-metrics-types.html "> Workflow Metrics Types</ a > </ li >
146
+ < li class ="toctree-l1 "> < a class ="reference internal " href ="document_report_types.html "> Document Report Metrics Types</ a > </ li >
147
+ </ ul >
148
+
149
+
150
+
151
+ </ div >
152
+
153
+ </ div >
154
+ </ nav >
155
+
156
+ < section data-toggle ="wy-nav-shift " class ="wy-nav-content-wrap ">
157
+
158
+
159
+ < nav class ="wy-nav-top " aria-label ="top navigation ">
160
+
161
+ < i data-toggle ="wy-nav-top " class ="fa fa-bars "> </ i >
162
+ < a href ="index.html "> Indico Python Client</ a >
163
+
164
+ </ nav >
165
+
166
+
167
+ < div class ="wy-nav-content ">
168
+
169
+ < div class ="rst-content ">
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+ < div role ="navigation " aria-label ="breadcrumbs navigation ">
190
+
191
+ < ul class ="wy-breadcrumbs ">
192
+
193
+ < li > < a href ="index.html " class ="icon icon-home "> </ a > »</ li >
194
+
195
+ < li > < a href ="examples.html "> Examples</ a > »</ li >
196
+
197
+ < li > Query for Document Report</ li >
198
+
199
+
200
+ < li class ="wy-breadcrumbs-aside ">
201
+
202
+
203
+ < a href ="_sources/document-report-ex.rst.txt " rel ="nofollow "> View page source</ a >
204
+
205
+
206
+ </ li >
207
+
208
+ </ ul >
209
+
210
+
211
+ < hr />
212
+ </ div >
213
+ < div role ="main " class ="document " itemscope ="itemscope " itemtype ="http://schema.org/Article ">
214
+ < div itemprop ="articleBody ">
215
+
216
+ < div class ="section " id ="query-for-document-report ">
217
+ < h1 > Query for Document Report< a class ="headerlink " href ="#query-for-document-report " title ="Permalink to this headline "> ¶</ a > </ h1 >
218
+ < div class ="highlight-default notranslate "> < div class ="highlight "> < pre > < span > </ span >
219
+ < span class ="kn "> from</ span > < span class ="nn "> datetime</ span > < span class ="kn "> import</ span > < span class ="n "> datetime</ span >
220
+ < span class ="kn "> from</ span > < span class ="nn "> typing</ span > < span class ="kn "> import</ span > < span class ="n "> List</ span >
221
+ < span class ="kn "> from</ span > < span class ="nn "> indico</ span > < span class ="kn "> import</ span > < span class ="n "> IndicoConfig</ span > < span class ="p "> ,</ span > < span class ="n "> IndicoClient</ span >
222
+ < span class ="kn "> from</ span > < span class ="nn "> indico.queries.document_report</ span > < span class ="kn "> import</ span > < span class ="n "> GetDocumentReport</ span >
223
+ < span class ="kn "> from</ span > < span class ="nn "> indico.types.document_report</ span > < span class ="kn "> import</ span > < span class ="n "> DocumentReport</ span >
224
+ < span class ="kn "> from</ span > < span class ="nn "> indico.filters</ span > < span class ="kn "> import</ span > < span class ="n "> DocumentReportFilter</ span >
225
+
226
+
227
+ < span class ="sd "> """Example 1: Document Report for a date range and page through the results"""</ span >
228
+
229
+ < span class ="n "> my_config</ span > < span class ="o "> =</ span > < span class ="n "> IndicoConfig</ span > < span class ="p "> (</ span >
230
+ < span class ="n "> host</ span > < span class ="o "> =</ span > < span class ="s2 "> "app.indico.io"</ span > < span class ="p "> ,</ span > < span class ="n "> api_token_path</ span > < span class ="o "> =</ span > < span class ="s2 "> "./path/to/indico_api_token.txt"</ span >
231
+ < span class ="p "> )</ span >
232
+
233
+ < span class ="n "> client</ span > < span class ="o "> =</ span > < span class ="n "> IndicoClient</ span > < span class ="p "> (</ span > < span class ="n "> config</ span > < span class ="o "> =</ span > < span class ="n "> my_config</ span > < span class ="p "> )</ span >
234
+
235
+ < span class ="n "> filter_opts</ span > < span class ="o "> =</ span > < span class ="n "> DocumentReportFilter</ span > < span class ="p "> (</ span > < span class ="n "> created_at_start_date</ span > < span class ="o "> =</ span > < span class ="n "> datetime</ span > < span class ="p "> (</ span > < span class ="mi "> 2021</ span > < span class ="p "> ,</ span > < span class ="mi "> 7</ span > < span class ="p "> ,</ span > < span class ="mi "> 1</ span > < span class ="p "> ),</ span > < span class ="n "> created_at_end_date</ span > < span class ="o "> =</ span > < span class ="n "> datetime</ span > < span class ="o "> .</ span > < span class ="n "> now</ span > < span class ="p "> ())</ span >
236
+
237
+ < span class ="n "> document_report</ span > < span class ="p "> :</ span > < span class ="n "> List</ span > < span class ="p "> [</ span > < span class ="n "> DocumentReport</ span > < span class ="p "> ]</ span > < span class ="o "> =</ span > < span class ="p "> []</ span >
238
+ < span class ="k "> for</ span > < span class ="n "> page</ span > < span class ="ow "> in</ span > < span class ="n "> client</ span > < span class ="o "> .</ span > < span class ="n "> paginate</ span > < span class ="p "> (</ span > < span class ="n "> GetDocumentReport</ span > < span class ="p "> (</ span > < span class ="n "> filters</ span > < span class ="o "> =</ span > < span class ="n "> filter_opts</ span > < span class ="p "> ,</ span > < span class ="n "> limit</ span > < span class ="o "> =</ span > < span class ="mi "> 1000</ span > < span class ="p "> )):</ span >
239
+ < span class ="n "> document_report</ span > < span class ="o "> .</ span > < span class ="n "> extend</ span > < span class ="p "> (</ span > < span class ="n "> page</ span > < span class ="p "> )</ span >
240
+ </ pre > </ div >
241
+ </ div >
242
+ </ div >
243
+
244
+
245
+ </ div >
246
+
247
+ </ div >
248
+ < footer >
249
+ < div class ="rst-footer-buttons " role ="navigation " aria-label ="footer navigation ">
250
+ < a href ="config.html " class ="btn btn-neutral float-right " title ="IndicoConfig " accesskey ="n " rel ="next "> Next < span class ="fa fa-arrow-circle-right " aria-hidden ="true "> </ span > </ a >
251
+ < a href ="workflow-metrics-ex.html " class ="btn btn-neutral float-left " title ="Fetching Workflow Metrics " accesskey ="p " rel ="prev "> < span class ="fa fa-arrow-circle-left " aria-hidden ="true "> </ span > Previous</ a >
252
+ </ div >
253
+
254
+ < hr />
255
+
256
+ < div role ="contentinfo ">
257
+ < p >
258
+ © Copyright 2020, Indico.
259
+
260
+ </ p >
261
+ </ div >
262
+
263
+
264
+
265
+ Built with < a href ="https://www.sphinx-doc.org/ "> Sphinx</ a > using a
266
+
267
+ < a href ="https://github.com/readthedocs/sphinx_rtd_theme "> theme</ a >
268
+
269
+ provided by < a href ="https://readthedocs.org "> Read the Docs</ a > .
270
+
271
+ </ footer >
272
+ </ div >
273
+ </ div >
274
+
275
+ </ section >
276
+
277
+ </ div >
278
+
279
+
280
+ < script type ="text/javascript ">
281
+ jQuery ( function ( ) {
282
+ SphinxRtdTheme . Navigation . enable ( true ) ;
283
+ } ) ;
284
+ </ script >
285
+
286
+
287
+
288
+
289
+
290
+
291
+ </ body >
292
+ </ html >
0 commit comments