You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<spanclass="sig-name descname"><spanclass="pre">make_payloads</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#nightfall.api.Nightfall.make_payloads" title="Permalink to this definition">¶</a></dt>
212
-
<dd><p>Turn a list of dicts <codeclass="docutils literal notranslate"><spanclass="pre">[{'id':</span><spanclass="pre">'string'},]</span></code> into a list of
213
-
acceptable payloads.</p>
212
+
<dd><p>Turn a dict into a list of acceptable payloads.</p>
214
213
<p>Creates chunks based on the <codeclass="docutils literal notranslate"><spanclass="pre">MAX_PAYLOAD_SIZE</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">MAX_NUM_ITEMS</span></code>
215
214
constants.</p>
216
-
<p>When the number of items in a list is greater than <codeclass="docutils literal notranslate"><spanclass="pre">MAX_NUM_ITEMS</span></code>
217
-
we will split the list into multiple lists. When the total sum of all
218
-
strings in a list is greater than <codeclass="docutils literal notranslate"><spanclass="pre">MAX_PAYLOAD_SIZE</span></code>, we will split
219
-
that list into multiple lists.</p>
215
+
<p>When the number of items in a dict is greater than <codeclass="docutils literal notranslate"><spanclass="pre">MAX_NUM_ITEMS</span></code>
216
+
or total sum of all strings in a dict is greater than
217
+
<codeclass="docutils literal notranslate"><spanclass="pre">MAX_PAYLOAD_SIZE</span></code>, we will split that dict into multiple dicts.</p>
220
218
<dlclass="field-list simple">
221
219
<dtclass="field-odd">Parameters</dt>
222
-
<ddclass="field-odd"><p><strong>data</strong> (<em>list</em>) – list of dicts</p>
220
+
<ddclass="field-odd"><p><strong>data</strong> (<em>list</em>) – dict in form of <codeclass="docutils literal notranslate"><spanclass="pre">{'id':</span><spanclass="pre">'string',}</span></code></p>
223
221
</dd>
224
222
<dtclass="field-even">Raises</dt>
225
223
<ddclass="field-even"><p><aclass="reference internal" href="#nightfall.exceptions.InputError" title="nightfall.exceptions.InputError"><strong>InputError</strong></a> – when individual dictionary item is larger than
<spanclass="sig-name descname"><spanclass="pre">scan</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">data</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#nightfall.api.Nightfall.scan" title="Permalink to this definition">¶</a></dt>
237
-
<dd><p>Scan lists of data with Nightfall.</p>
238
-
<p>This method will convert the list of dicts into chunks if necessary
235
+
<dd><p>Scan data with Nightfall.</p>
236
+
<p>This method will convert a dict into chunks if necessary
239
237
and then makes one or more requests to the Nightfall API to scan the
240
238
data.</p>
241
239
<p>data dicts should be in the following format:</p>
0 commit comments