cryptosat / cryptosat-python-sdk

A wrapper for Cryptosat's APIs
0 stars 0 forks source link

Interactive Python SDK Sandbox #4

Open cshepherd opened 11 months ago

cshepherd commented 11 months ago

Combine Jerzy's updated Python SDK with interactive web REPL "Skulpt" (MIT licensed) to create a sandbox to showcase the Python SDK, much as the current sandbox showcases the Javascript SDK with an interactive web REPL.

cshepherd commented 11 months ago

Pyodide is the technology that I've selected for this. It works by compiling CPython to WebAssembly. Transpiler (Python-to-JS) approaches such as Brython, Transcrypt, and Skulpt/Trinket download somewhat faster, but they do not support packages. That narrows the choice to Pyodide and PyPy.

The approach I'll be taking with Pyodide, is creating a package similar to the existing @cryptosat/jsconsole component, except that it will be a Python interpreter instead of JS. The UI will be tabbed (JS and Python tabs) and permit freely switching back and forth between the languages. I have seen this approach with other SDK demo pages that support multiple languages, and it has been a pleasant experience.

The Python SDK is now ready to use, so I have no blockers.

cshepherd commented 10 months ago

See http://github.com/cryptosat/cryptosim-tutorial/pull/40 for design review and code review.