---

title: Pagination


keywords: fastai
sidebar: home_sidebar

summary: "Parallel and serial pagination"
description: "Parallel and serial pagination"
nb_path: "03_page.ipynb"
---
<!--

#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: 03_page.ipynb
# command to build the docs after a change: nbdev_build_docs

-->

<div class="container" id="notebook-container">
        
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="Paged-operations">Paged operations<a class="anchor-link" href="#Paged-operations"> </a></h3>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Some GitHub API operations return their results one page at a time. For instance, there are many thousands of <a href="https://docs.github.com/en/free-pro-team@latest/github/writing-on-github/creating-gists">gists</a>, but if we call <code>list_public</code> we only see the first 30:</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">api</span> <span class="o">=</span> <span class="n">GhApi</span><span class="p">()</span>
</pre></div>

    </div>
</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">gists</span> <span class="o">=</span> <span class="n">api</span><span class="o">.</span><span class="n">gists</span><span class="o">.</span><span class="n">list_public</span><span class="p">()</span>
<span class="nb">len</span><span class="p">(</span><span class="n">gists</span><span class="p">)</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>30</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>That's because this operation takes two optional parameters, <code>per_page</code>, and <a href="/page.html"><code>page</code></a>:</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">api</span><span class="o">.</span><span class="n">gists</span><span class="o">.</span><span class="n">list_public</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea output_execute_result">
<p><a href="https://docs.github.com/v3/gists/#list-public-gists">gists.list_public</a>(since, per_page, page): <em>List public gists</em></p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>This is a common pattern for <code>list_*</code> operations in the GitHub API. One way to get more results is to increase <code>per_page</code>:</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="nb">len</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">gists</span><span class="o">.</span><span class="n">list_public</span><span class="p">(</span><span class="n">per_page</span><span class="o">=</span><span class="mi">100</span><span class="p">))</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>100</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>However, <code>per_page</code> has a maximum of <code>100</code>, so if you want more, you'll have to pass <code>page=</code> to get pages beyond the first. An easy way to iterate through all pages is to use <a href="/page.html#paged"><code>paged</code></a>.</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="paged" class="doc_header"><code>paged</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/page.py#L14" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>paged</code>(<strong><code>oper</code></strong>, <strong>*<code>args</code></strong>, <strong><code>per_page</code></strong>=<em><code>30</code></em>, <strong><code>max_pages</code></strong>=<em><code>9999</code></em>, <strong>**<code>kwargs</code></strong>)</p>
</blockquote>
<p>Convert operation <code>oper(*args,**kwargs)</code> into an iterator</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>We'll demonstrate this using the <code>repos.list_for_org</code> method:</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">api</span><span class="o">.</span><span class="n">repos</span><span class="o">.</span><span class="n">list_for_org</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea output_execute_result">
<p><a href="https://docs.github.com/v3/repos/#list-organization-repositories">repos.list_for_org</a>(org, type, sort, direction, per_page, page): <em>List organization repositories</em></p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">repos</span> <span class="o">=</span> <span class="n">api</span><span class="o">.</span><span class="n">repos</span><span class="o">.</span><span class="n">list_for_org</span><span class="p">(</span><span class="s1">&#39;fastai&#39;</span><span class="p">)</span>
<span class="nb">len</span><span class="p">(</span><span class="n">repos</span><span class="p">),</span><span class="n">repos</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">name</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>(30, &#39;fast-image&#39;)</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>To convert this operation into a Python iterator, pass the operation itself, along with any arguments (either keyword or positional) to <a href="/page.html#paged"><code>paged</code></a>:</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">repos</span> <span class="o">=</span> <span class="n">paged</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">repos</span><span class="o">.</span><span class="n">list_for_org</span><span class="p">,</span> <span class="s1">&#39;fastai&#39;</span><span class="p">)</span>
</pre></div>

    </div>
</div>
</div>

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>You can now iterate through <code>repos</code> using Python, e.g:</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="k">for</span> <span class="n">page</span> <span class="ow">in</span> <span class="n">repos</span><span class="p">:</span> <span class="nb">print</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">page</span><span class="p">),</span> <span class="n">page</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">

<div class="output_subarea output_stream output_stdout output_text">
<pre>30 fast-image
30 fastforest
30 .github
3 tweetrel
</pre>
</div>
</div>

</div>
</div>

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="Link-header-(RFC-5988)">Link header (RFC 5988)<a class="anchor-link" href="#Link-header-(RFC-5988)"> </a></h3>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>GitHub tells us how many pages are available using the <a href="https://tools.ietf.org/html/rfc5988">link header</a>. Unfortunately the pypi <a href="https://pypi.org/project/LinkHeader/">LinkHeader</a> library appears to no longer be maintained, so we've put a refactored version of it here.</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="parse_link_hdr" class="doc_header"><code>parse_link_hdr</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/page.py#L49" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>parse_link_hdr</code>(<strong><code>header</code></strong>)</p>
</blockquote>
<p>Parse an RFC 5988 link header, returning a <code>dict</code> from rels to a <code>tuple</code> of URL and attrs <code>dict</code></p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Here's an example of a link header with just one link:</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">parse_link_hdr</span><span class="p">(</span><span class="s1">&#39;&lt;http://example.com&gt;; rel=&quot;foo bar&quot;; type=text/html&#39;</span><span class="p">)</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>{&#39;foo bar&#39;: (&#39;http://example.com&#39;, {&#39;type&#39;: &#39;text/html&#39;})}</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">links</span> <span class="o">=</span> <span class="n">parse_link_hdr</span><span class="p">(</span><span class="s1">&#39;&lt;http://example.com&gt;; rel=&quot;foo bar&quot;; type=text/html&#39;</span><span class="p">)</span>
<span class="n">link</span> <span class="o">=</span> <span class="n">links</span><span class="p">[</span><span class="s1">&#39;foo bar&#39;</span><span class="p">]</span>
<span class="n">test_eq</span><span class="p">(</span><span class="n">link</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="s1">&#39;http://example.com&#39;</span><span class="p">)</span>
<span class="n">test_eq</span><span class="p">(</span><span class="n">link</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="s1">&#39;type&#39;</span><span class="p">],</span> <span class="s1">&#39;text/html&#39;</span><span class="p">)</span>
</pre></div>

    </div>
</div>
</div>

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Let's test it on the headers we received on our last call to GitHub. You can access the last call's headers in `recv_hdrs':</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">api</span><span class="o">.</span><span class="n">recv_hdrs</span><span class="p">[</span><span class="s1">&#39;Link&#39;</span><span class="p">]</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>&#39;&lt;https://api.github.com/organizations/20547620/repos?per_page=30&amp;page=4&gt;; rel=&#34;prev&#34;, &lt;https://api.github.com/organizations/20547620/repos?per_page=30&amp;page=4&gt;; rel=&#34;last&#34;, &lt;https://api.github.com/organizations/20547620/repos?per_page=30&amp;page=1&gt;; rel=&#34;first&#34;&#39;</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Here's what happens when we parse that:</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">parse_link_hdr</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">recv_hdrs</span><span class="p">[</span><span class="s1">&#39;Link&#39;</span><span class="p">])</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>{&#39;prev&#39;: (&#39;https://api.github.com/organizations/20547620/repos?per_page=30&amp;page=4&#39;,
  {}),
 &#39;last&#39;: (&#39;https://api.github.com/organizations/20547620/repos?per_page=30&amp;page=4&#39;,
  {}),
 &#39;first&#39;: (&#39;https://api.github.com/organizations/20547620/repos?per_page=30&amp;page=1&#39;,
  {})}</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="Getting-pages-in-parallel">Getting pages in parallel<a class="anchor-link" href="#Getting-pages-in-parallel"> </a></h3>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Rather than requesting each page one at a time, we can save some time by getting all the pages we need in parallel.</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="GhApi.last_page" class="doc_header"><code>GhApi.last_page</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/page.py#L54" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>GhApi.last_page</code>()</p>
</blockquote>
<p>Parse RFC 5988 link header from most recent operation, and extract the last page</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>To help us know the number of pages needed, we can use <code>last_page</code>, which uses the link header we just looked at to grab the last page from GitHub.</p>
<p>We will need multiple pages to get all the repos in the <code>github</code> organization, even if we get 100 at a time:</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">api</span><span class="o">.</span><span class="n">repos</span><span class="o">.</span><span class="n">list_for_org</span><span class="p">(</span><span class="s1">&#39;github&#39;</span><span class="p">,</span> <span class="n">per_page</span><span class="o">=</span><span class="mi">100</span><span class="p">)</span>
<span class="n">api</span><span class="o">.</span><span class="n">last_page</span><span class="p">()</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>4</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="pages" class="doc_header"><code>pages</code><a href="https://github.com/fastai/ghapi/tree/master/ghapi/page.py#L67" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>pages</code>(<strong><code>oper</code></strong>, <strong><code>n_pages</code></strong>, <strong>*<code>args</code></strong>, <strong><code>n_workers</code></strong>=<em><code>None</code></em>, <strong><code>per_page</code></strong>=<em><code>100</code></em>, <strong>**<code>kwargs</code></strong>)</p>
</blockquote>
<p>Get <code>n_pages</code> pages from <code>oper(*args,**kwargs)</code></p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p><a href="/page.html#pages"><code>pages</code></a> by default passes <code>per_page=100</code> to the operation.</p>
<p>Let's look at some examples. To get all the pages for the repos in the <code>github</code> organization in parallel, we can use this:</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">gh_repos</span> <span class="o">=</span> <span class="n">pages</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">repos</span><span class="o">.</span><span class="n">list_for_org</span><span class="p">,</span> <span class="n">api</span><span class="o">.</span><span class="n">last_page</span><span class="p">(),</span> <span class="s1">&#39;github&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">concat</span><span class="p">()</span>
<span class="nb">len</span><span class="p">(</span><span class="n">gh_repos</span><span class="p">)</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>367</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>If you already know ahead of time the number of pages required, there's no need to call <code>last_page</code>. For instance, the GitHub docs specify that we can get at most 3000 gists:</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">gists</span> <span class="o">=</span> <span class="n">pages</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">gists</span><span class="o">.</span><span class="n">list_public</span><span class="p">,</span> <span class="mi">30</span><span class="p">)</span><span class="o">.</span><span class="n">concat</span><span class="p">()</span>
<span class="nb">len</span><span class="p">(</span><span class="n">gists</span><span class="p">)</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>3000</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>GitHub ignores the <code>per_page</code> parameter for some API calls, such as listing public events, which it limits to 8 pages of 30 items per page. To retrieve all pages in these cases, you need to explicitly pass the lower per page limit:</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">api</span><span class="o">.</span><span class="n">activity</span><span class="o">.</span><span class="n">list_public_events</span><span class="p">()</span>
<span class="n">api</span><span class="o">.</span><span class="n">last_page</span><span class="p">()</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>8</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">evts</span> <span class="o">=</span> <span class="n">pages</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">activity</span><span class="o">.</span><span class="n">list_public_events</span><span class="p">,</span> <span class="n">api</span><span class="o">.</span><span class="n">last_page</span><span class="p">(),</span> <span class="n">per_page</span><span class="o">=</span><span class="mi">30</span><span class="p">)</span><span class="o">.</span><span class="n">concat</span><span class="p">()</span>
<span class="nb">len</span><span class="p">(</span><span class="n">evts</span><span class="p">)</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>232</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

</div>
 

