A command-line based alternative to Jupyter notebooks
Project description
Satyrn
Satyrn is a command-line-based alternative to Jupyter notebooks.
The backend is completely based on node networks, because I soon
plan to implement branching code graphs in order to provide the user
with visual differentiation while writing code, and perhaps even
worry-free backend multithreading.
This project is based on this JEP for the Jupyter ecosystem. I'm using this as a way to prepare for development of the features I've listed in the enhancement proposal.
Setup
- Install requirements with
python -m pip install -r requirements.txt - Run
python interpreter.py
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_typeto "python" for python cells - If
add_contentis "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 -> cswap a bb -> 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_nameis 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 and edge names 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.
Example
Here, code written in [ ] brackets was typed into the text box popup.
♄: create_cell root python y
[x = 10]
♄: create_cell mid python y
[x *= 22]
♄: create_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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file satyrn-python-0.5.3.tar.gz.
File metadata
- Download URL: satyrn-python-0.5.3.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.11.1 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.31.0 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae189d4873b1cbd4493518014d7614f95fb30a94880400d26ac4c3faa3bd5433
|
|
| MD5 |
53a3adee131ddcb4807d9daff4fd887f
|
|
| BLAKE2b-256 |
80488b469e4ed8687ab20b7458c00ae799c36942cef3cfcc62088e2933dd3b51
|
File details
Details for the file satyrn_python-0.5.3-py3-none-any.whl.
File metadata
- Download URL: satyrn_python-0.5.3-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.11.1 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.31.0 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a7dd2f039bea4b4826ca3c633fec558691e7a4afaebf1f692238dd52b71bed9
|
|
| MD5 |
8d8853dbee1f8a8422ef97fc3ad4a36d
|
|
| BLAKE2b-256 |
eb179af3708a44572c62dfded99c8326ed3cd531af93401d6de4229fa44fc390
|