Run this cell to add molecule to the drawing board and get its smiles back
To run cell, click on it and press Shift+Enter.
Run this cell to convert ketcher smiles to rdkit smiles with rdkit.js
There are many more Ketcher and Rdkit.js javascript methods. Refer to their documentation for more info:
You can read anacondas announcement on what is PyScript. Essentially it's python that runs in the browser. Important that it's not python translated to javascript, but it's actual python compiled for browser.
PyScript was created in such a way that you can easily use python functions in JavaScript and parts of JavaScript in python.
In this gist you can find how to set up ketcher and PyScript for local development.