-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f0b1a1
commit 3ffe2d9
Showing
5 changed files
with
474 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Juypter Notebooks (IPython) | ||
########################### | ||
|
||
If you want to run a Jupyter notebook with all the setup a script has (named contracts, ``sys.path`` adjustments, etc), you can use the following code: | ||
|
||
.. code-block:: python | ||
from moccasin import setup_notebook | ||
setup_notebook() | ||
Then, you can work with the notebook as you would normally. | ||
|
||
.. code-block:: python | ||
from moccasin.config import get_active_network | ||
active_network = get_active_network() | ||
eth_usd = active_network.manifest_named("eth_usd_price_feed") | ||
If you update your config while the notebook is running, you can reload the config with: | ||
|
||
.. code-block:: python | ||
from moccasin.config import get_config | ||
config = get_config() | ||
# This command | ||
config.reload() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.