Chrome extension in python?

There is no Python built into Chrome but I am wondering whether pyjs can help you.


You can make a standard Google Chrome extension with Python (server-less) https://pythonspot.com/en/create-a-chrome-plugin-with-python/

The idea is to compile Python to Javascript (technically a JS pre-compiler) using Rapydscript. Then include the generated script in the Chrome extension. The site above has a zip file with all the stuff inside.

I recommend using Rapydscript instead of Pyjamas. A Python script compiled with Rapydscript works like any other Chrome plugin.

Pyjamas scripts does not work well with Google Chrome (needs a special parameter when Chrome starts or server).


Although you mentioned you don't want it to be a hosted app, but this is one typical scenario where a hosted app can do.

SciPy is not a package that is easy to deploy. Even if you are writing a installed application based on SciPy, it requires some effort to deploy this dependency. A web application can help here where you put most of the hard-to-deploy dependencies on the server side (which is a one-off thing). And the client side can be really light.


You can make AJAX calls to a separate service with Python from your Google Chrome Extension. All complex logic will be moved to separate microservice. There is a video how to create Chrome extension, maybe you will find something there - https://youtu.be/l17LDVytSE8


I'm writing an extension with Flexx PScript and like it very much. Here's an overview of different tools compared to PScript (do not trust this article, it's written by flexx developers:).