A Notebook alternative that supports branching code
Project description
Satyrn
Satyrn is an alternative to Jupyter notebooks that supports branching code cells.
Contributors
- Charles Averill - Author, back- & front-end feature integration
- Nathan Huckleberry - Networking, optimization
- Tristan Wiesepape - Networking, optimization
- Ronak Malik - Networking, optimization
- Merkie - Frontend design
- syrinsaya - UI design
Setup
- Run
python -m pip install satyrn-python
- Run
satyrnCLI
in your terminal to open the Satyrn CLI - Run
satyrn
in your terminal to open the Satyrn UI (unstable)
CLI Commands
quit
- Quits out of interpretercell [cell_name] [content_type](python/markdown) [add_content](y/n)
- Creates cell with given parameters
- All cells require unique names
- The first cell created will always be treated as the "root" cell, and will always be executed first in a complete execution call.
- Set
content_type
to "python" for python cells - If
add_content
is "y", a text box will pop up. Input your python code here.
remove [cell_name]
- Deletes cell and its links from graph.
edit [cell_name]
- Reopens text input window so that users can edit cells
link [first_cell_name] [second_cell_name]
- Links the two cells whose names are provided. You can technically still make branching graphs this way, but they will not work at all.
sever [first_cell_name] [second_cell_name]
- Severs the link between the two cells whose names are provided
merge [first_cell_name] [second_cell_name]
- Merges the two cells if they are adjacent.
swap [first_cell_name] [second_cell_name]
- Swaps the contents and names of the named cells. e.g.
a -> b -> c
swap a b
b -> a -> c
- Swaps the contents and names of the named cells. e.g.
execute [cell_name_1] [cell_name_2] ... >> (filename)
- If no cell names are defined, the entire graph will execute sequentially
- If cell names are defined, they will execute in the order they are named
>> (filename)
is optional. If included, will save stdout cell output to whatever filename is provided.
display [cell_name]
- If
cell_name
is defined, that cell's contents will be printed to the console - Otherwise, the entire graph will be displayed in matplotlib.
- If
list
- Prints a list of all cell names and edge pairs in graph
reset_runtime
- Deletes all local variables created by cells.
reset_graph
- Deletes all cells and variables. Equivalent of restarting Satyrn session.
save [filename].satx
- Saves graph to .satx file.
[filename].satx
- This will run a .satx file. It's just a reformatted version of the normal Satyrn input. This test file shows the basic syntax rules.
CLI Example
Here, code written in [ ] brackets was typed into the text box popup.
♄: cell root python y
[x = 10]
♄: cell mid python y
[x *= 22]
♄: cell bottom python y
[print(x)]
♄: link root mid
♄: link mid bottom
♄: execute
220
♄: quit
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
satyrn_python-0.8.5.tar.gz
(2.3 MB
view hashes)
Built Distribution
Close
Hashes for satyrn_python-0.8.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75c142951d44ca1ecc465125edaaad02cacc34b4d500d8b378b83039d715c99a |
|
MD5 | 0886c7d9165bcdfcdac4d6e80b13999e |
|
BLAKE2b-256 | b295021b9f0c63e1382261bc1807924918a3627e2437410f330ecad4f6394ee4 |