Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 4, 2024
1 parent 1001999 commit c3650ee
Show file tree
Hide file tree
Showing 23 changed files with 59 additions and 5 deletions.
Binary file modified latest/.doctrees/commands/console.doctree
Binary file not shown.
Binary file modified latest/.doctrees/commands/networks.doctree
Binary file not shown.
Binary file modified latest/.doctrees/environment.pickle
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/ape.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/ape_ethereum.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/ape_node.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/api.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/cli.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/contracts.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/exceptions.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/managers.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/plugins.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/types.doctree
Binary file not shown.
Binary file modified latest/.doctrees/methoddocs/utils.doctree
Binary file not shown.
Binary file modified latest/.doctrees/userguides/console.doctree
Binary file not shown.
15 changes: 15 additions & 0 deletions latest/_sources/userguides/console.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,18 @@ Out[3]: '0.00040634 ETH'
In [4]: %bal 0xE3747e6341E0d3430e6Ea9e2346cdDCc2F8a4b5b
Out[4]: '0.00040634 ETH'
```

## Executing Code

You can also use the `ape console` to execute programs directly from strings.
This is similar to the `python -c|--code` option except it will display the output cell.
Anything available in `ape console` is also available in `ape console --code`.

```shell
ape console -c 'project.name'
Out[1]: 'my-project'
ape console -c 'x = 3\nx + 1'
Out[1]: 4
ape console -c 'networks.active_provider.name'
Out[1]: 'test'
```
6 changes: 6 additions & 0 deletions latest/commands/console.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ <h2>console<a class="headerlink" href="#console" title="Link to this heading">
<dd><p>One of ERROR, WARNING, SUCCESS, INFO, or DEBUG</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-console-c">
<span id="cmdoption-console-code"></span><span class="sig-name descname"><span class="pre">-c</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--code</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;code&gt;</span></span><a class="headerlink" href="#cmdoption-console-c" title="Link to this definition"></a></dt>
<dd><p>Program passed in as a string</p>
</dd></dl>

</section>
</section>

Expand Down
4 changes: 2 additions & 2 deletions latest/commands/networks.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ <h2>list<a class="headerlink" href="#networks-list" title="Link to this heading"
<dd><p>Filter the results by network</p>
<dl class="field-list simple">
<dt class="field-odd">Options<span class="colon">:</span></dt>
<dd class="field-odd"><p>mainnet-fork | mainnet | holesky-fork | sepolia-fork | local | sepolia | holesky</p>
<dd class="field-odd"><p>holesky-fork | mainnet-fork | sepolia-fork | sepolia | mainnet | local | holesky</p>
</dd>
</dl>
</dd></dl>
Expand All @@ -215,7 +215,7 @@ <h2>list<a class="headerlink" href="#networks-list" title="Link to this heading"
<dd><p>Filter the results by provider</p>
<dl class="field-list simple">
<dt class="field-odd">Options<span class="colon">:</span></dt>
<dd class="field-odd"><p>test | node</p>
<dd class="field-odd"><p>node | test</p>
</dd>
</dl>
</dd></dl>
Expand Down
18 changes: 18 additions & 0 deletions latest/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ <h2 id="Symbols">Symbols</h2>
<li><a href="commands/plugins.html#cmdoption-plugins-list-a">plugins-list command line option</a>
</li>
<li><a href="commands/pm.html#cmdoption-pm-list-all">pm-list command line option</a>
</li>
</ul></li>
<li>
--code

<ul>
<li><a href="commands/console.html#cmdoption-console-c">console command line option</a>
</li>
</ul></li>
<li>
Expand Down Expand Up @@ -328,6 +335,13 @@ <h2 id="Symbols">Symbols</h2>

<ul>
<li><a href="commands/plugins.html#cmdoption-plugins-list-a">plugins-list command line option</a>
</li>
</ul></li>
<li>
-c

<ul>
<li><a href="commands/console.html#cmdoption-console-c">console command line option</a>
</li>
</ul></li>
<li>
Expand Down Expand Up @@ -1559,7 +1573,11 @@ <h2 id="C">C</h2>
console command line option

<ul>
<li><a href="commands/console.html#cmdoption-console-c">--code</a>
</li>
<li><a href="commands/console.html#cmdoption-console-v">--verbosity</a>
</li>
<li><a href="commands/console.html#cmdoption-console-c">-c</a>
</li>
<li><a href="commands/console.html#cmdoption-console-v">-v</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions latest/methoddocs/ape_node.html

Large diffs are not rendered by default.

Binary file modified latest/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion latest/searchindex.js

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions latest/userguides/console.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
<li><a class="reference internal" href="#bal">%bal</a></li>
</ul>
</li>
<li><a class="reference internal" href="#executing-code">Executing Code</a></li>
</ul>
</div><div id="ethical-ad-placement" data-ea-publisher="readthedocs"></div></div>
</aside>
Expand Down Expand Up @@ -335,6 +336,20 @@ <h3>%bal<a class="headerlink" href="#bal" title="Link to this heading"></a></
</div>
</section>
</section>
<section id="executing-code">
<h2>Executing Code<a class="headerlink" href="#executing-code" title="Link to this heading"></a></h2>
<p>You can also use the <code class="docutils literal notranslate"><span class="pre">ape</span> <span class="pre">console</span></code> to execute programs directly from strings.
This is similar to the <code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">-c|--code</span></code> option except it will display the output cell.
Anything available in <code class="docutils literal notranslate"><span class="pre">ape</span> <span class="pre">console</span></code> is also available in <code class="docutils literal notranslate"><span class="pre">ape</span> <span class="pre">console</span> <span class="pre">--code</span></code>.</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span data-line="1">ape<span class="w"> </span>console<span class="w"> </span>-c<span class="w"> </span><span class="s1">&#39;project.name&#39;</span>
</span><span data-line="2">Out<span class="o">[</span><span class="m">1</span><span class="o">]</span>:<span class="w"> </span><span class="s1">&#39;my-project&#39;</span>
</span><span data-line="3">ape<span class="w"> </span>console<span class="w"> </span>-c<span class="w"> </span><span class="s1">&#39;x = 3\nx + 1&#39;</span>
</span><span data-line="4">Out<span class="o">[</span><span class="m">1</span><span class="o">]</span>:<span class="w"> </span><span class="m">4</span>
</span><span data-line="5">ape<span class="w"> </span>console<span class="w"> </span>-c<span class="w"> </span><span class="s1">&#39;networks.active_provider.name&#39;</span>
</span><span data-line="6">Out<span class="o">[</span><span class="m">1</span><span class="o">]</span>:<span class="w"> </span><span class="s1">&#39;test&#39;</span>
</span></pre></div>
</div>
</section>
</section>

</article><button class="back-to-top" type="button">
Expand Down

0 comments on commit c3650ee

Please sign in to comment.