I would like to create a google chrome extension. Specifically, I'd like to make a packaged app, but not a hosted app. Am I correct in thinking this limits me to JavaScript (and HTML/CSS)?
My problem is that I need to do some complex math (singular value decomposition, factor analysis) and I don't want to write algorithms for this in javascript. Python already has libraries for the functions I need (SciPy), but I can't find any indication that I can make a Chrome extension using python.
Is this correct? Do I have any other options?
Python Bindings for Google Chrome API might provide what you are looking for. Those bindings are for CEF, which is explicitly not compatible with Chrome extensions, so it definitely can't be used to make them.
A chrome extension is a program that is installed in the Chrome browser that enhances the functionality of the browser. You can build one easily using web technologies like HTML, CSS, and JavaScript. Creating a chrome extension is similar to creating a web application, but it requires a manifest.
Chrome extensions extend Chrome's capabilities. You write them using HTML, CSS, and JavaScript.
You can find your extension in /compiledpythonextension/. Load it in chrome as unpackaged extension and see it working :-) Chrome plugins are created using HTML, JavaScript and CSS. We can use Python to create normal Chrome extensions using a Python to Javascript compiler (Rapydscript).
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). Show activity on this post. 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.
Drag and drop the directory where your extension files live onto chrome://extensions in your browser to load it. If the extension is valid, it’ll be loaded up and active right away! Open the chrome://extensions page. Drag the folder to the chrome://extensions page. Installation Successful! Click on the icon & the message will get displayed!
There are several tools to compile Python to Javascript. Rapydscript works fine, Pyjs does not work well with chrome (requires special parameter on start). You can find your extension in /compiledpythonextension/. Load it in chrome as unpackaged extension and see it working :-) Chrome plugins are created using HTML, JavaScript and CSS.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With