Skip to content

Commit

Permalink
docs: updated sphinx docs
Browse files Browse the repository at this point in the history
  • Loading branch information
akimrx committed Mar 24, 2024
1 parent bf48ea7 commit 52f02d5
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ for secret in lockbox.list_secrets(folder_id="b1xxxxxxxxxx", iterator=True):
secret.deactivate()
secret.activate()

for version in secret.list_versions(iterator=True):
for version in secret.list_versions(iterator=True): # if iterator=False returns paginated list with ``next_page_token``
if version.id != secret.current_version.id:
version.schedule_version_destruction()
version.cancel_version_destruction()
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Other operations with secret
secret.deactivate()
secret.activate()
for version in secret.list_versions(iterator=True):
for version in secret.list_versions(iterator=True): # if iterator=False returns paginated list with ``next_page_token``
if version.id != secret.current_version.id:
version.schedule_version_destruction()
version.cancel_version_destruction()
Expand Down
2 changes: 2 additions & 0 deletions docs/_sources/pages/models.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Paginated models

Used when ``iterator=False``.

The models contain a ``next_page_token: str | None`` field pointing to the next page.

.. autopydantic_model:: yc_lockbox._models.SecretsList

.. autopydantic_model:: yc_lockbox._models.SecretVersionsList
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ <h3>Other operations with secret<a class="headerlink" href="#other-operations-wi
<span class="n">secret</span><span class="o">.</span><span class="n">deactivate</span><span class="p">()</span>
<span class="n">secret</span><span class="o">.</span><span class="n">activate</span><span class="p">()</span>

<span class="k">for</span> <span class="n">version</span> <span class="ow">in</span> <span class="n">secret</span><span class="o">.</span><span class="n">list_versions</span><span class="p">(</span><span class="n">iterator</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
<span class="k">for</span> <span class="n">version</span> <span class="ow">in</span> <span class="n">secret</span><span class="o">.</span><span class="n">list_versions</span><span class="p">(</span><span class="n">iterator</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span> <span class="c1"># if iterator=False returns paginated list with ``next_page_token``</span>
<span class="k">if</span> <span class="n">version</span><span class="o">.</span><span class="n">id</span> <span class="o">!=</span> <span class="n">secret</span><span class="o">.</span><span class="n">current_version</span><span class="o">.</span><span class="n">id</span><span class="p">:</span>
<span class="n">version</span><span class="o">.</span><span class="n">schedule_version_destruction</span><span class="p">()</span>
<span class="n">version</span><span class="o">.</span><span class="n">cancel_version_destruction</span><span class="p">()</span>
Expand Down
1 change: 1 addition & 0 deletions docs/pages/models.html
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ <h2>Domain models<a class="headerlink" href="#domain-models" title="Link to this
<section id="paginated-models">
<h3>Paginated models<a class="headerlink" href="#paginated-models" title="Link to this heading">#</a></h3>
<p>Used when <code class="docutils literal notranslate"><span class="pre">iterator=False</span></code>.</p>
<p>The models contain a <code class="docutils literal notranslate"><span class="pre">next_page_token:</span> <span class="pre">str</span> <span class="pre">|</span> <span class="pre">None</span></code> field pointing to the next page.</p>
<dl class="py class pydantic_model">
<dt class="sig sig-object py" id="yc_lockbox._models.SecretsList">
<em class="property"><span class="pre">pydantic</span> <span class="pre">model</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">yc_lockbox._models.</span></span><span class="sig-name descname"><span class="pre">SecretsList</span></span><a class="reference internal" href="../_modules/yc_lockbox/_models.html#SecretsList"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#yc_lockbox._models.SecretsList" title="Link to this definition">#</a></dt>
Expand Down
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs_src/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Other operations with secret
secret.deactivate()
secret.activate()
for version in secret.list_versions(iterator=True):
for version in secret.list_versions(iterator=True): # if iterator=False returns paginated list with ``next_page_token``
if version.id != secret.current_version.id:
version.schedule_version_destruction()
version.cancel_version_destruction()
Expand Down
2 changes: 2 additions & 0 deletions docs_src/source/pages/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Paginated models

Used when ``iterator=False``.

The models contain a ``next_page_token: str | None`` field pointing to the next page.

.. autopydantic_model:: yc_lockbox._models.SecretsList

.. autopydantic_model:: yc_lockbox._models.SecretVersionsList
Expand Down

0 comments on commit 52f02d5

Please sign in to comment.