The Banana CLI helps you build Potassium apps
Project description
banana-cli (WORK IN PROGRESS)
The Banana CLI helps you build Potassium apps
Watch a demo here
Hot-Reload Dev Server
The interactive dev server works like a react, next, or nodemon server in that it hot reloads on changes to different parts of your app.py
file.
On startup, and on changes to the init() block, it runs init() and handler().
On changes to the handler() block, it reruns the handler() without needing to wait for another init
It does this by pushing code in logical chunks to a jupyter notebook backend, to persist memory between refreshes.
To use it
Start the jupyter backend:
- set up a virtual env
python3 -m venv venv
- activate into that env
. ./venv/bin/activate
- install dependencies
pip3 install -r requirements.txt
- run a jupyter notebook server
jupyter notebook
- Copy the "token" string in the URL
Run the code watcher: (in a new shell)
- Put that token into watcher.py as jupyter_token
- Run watcher.py
python3 watcher.py
to watch app.py for changes
Play with it:
- Try changing the handler, see what happens!
- Try changing the init, see what happens!
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
banana_cli-0.0.4.tar.gz
(5.3 kB
view hashes)
Built Distribution
banana_cli-0.0.4-py3-none-any.whl
(10.1 kB
view hashes)
Close
Hashes for banana_cli-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6780a2df4809c1e9f6bba7d298e5caebee9ee75e4ae1afcc270d12a2e38cb4ea |
|
MD5 | 7bba93cf587c7f0262caaefc42034c9b |
|
BLAKE2b-256 | 4a0c5b6d1dc61418c6f35ee8991e796820f79256b13e077c76833b88ecebc637 |