brpy (http://www.brpy.org)
brpy is a browser-side interactive python client that stresses edit-as-you-go rapid-prototyping. The long term goal of the project is to provide a Mathematica-like environment where students, teachers, applied math enthusiasts and engineers can express their ideas and collaborate on projects.
With this platform, it should be simple to create standalone lessons, learning modules, and algorithm walkthrough/demos. brpy currently provides markdown and latex-style output and glut-based WebGL hooks. (In the future, we might provide built-in d3 support and canvas2D support.)
brpy is built on a fork/branch of skulpt.
This project is roughly divided into three parts:
-
Server-side
-
Client-side
- react as the component framework
- Codemirror
- python 2.7
- [pip] (https://pip.pypa.io/en/latest/installing.html)
- packages: simplejson, tornado, motor, watchdog, Google API Client (python)
- sass
- special skulpt fork
- For the python packages, you can use
pipto install them:
pip install simplejson google-api-python-client tornado motor watchdog
- Clone the forked skulpt (in the brpy root dir.):
git clone https://github.com/poweif/skulpt.git
- mongoDB installation
- Google API
- Go to the Google API console
- Create a new project, give it a name
- After you've selected the project, (on the left-hand side) go to
API & auth->APIs - Make sure the following APIs are enabled:
- Drive API
- Drive SDK
- Go to
API & auth->Credentials->Create Client ID- Choose 'Service account
andJSON key` - Click
Create Client ID Download JSONfor the Client ID you just created
- Choose 'Service account
- Rename the client ID file to
client_secret.json - Move
client_secret.jsonto./tools/files/
- Run script in
skulptto generate skulpt javascript library. If you're developing the forked skulpt, thenwatch.pyis useful as it will watch for changes and update the resulting lib. Otherwise, just run it once and stop it withCtrl-C.
cd skulpt
python ./tmp/watch.py ../js
- Run sass to generate css files. This can also be terminated with
Ctrl-Cif you will not be changing the sass files.
./tool/sass
-
Make sure the Google API Client ID file is present as
./tools/files/client_secret.json -
Run the server (terminate with
Ctrl-C)
python tools/server/tornado_server.py
- Open browser to
http://localhost:8124