Issue with mysql-connector-python in voici application

Good morning,
I’m creating an online application in Python in a notebook using the “voici” interface.
This application offers widgets that interact with a database.
Locally, my interface works: it modifies the online database.
When I upload this application to Github, on a template “voici”, I must provide the dependencies in the environment.yml file.
This is where a problem is generated: the server tells me that there is no mysql-connector-python module…?
Here is the content of my yml file:
"name: voici

  • emscripten-forge
  • conda-forge
  • mysql-connector-python
  • xeus-python
  • pandas <2"
    Is there another way to install this module in the environment “voici” ?
    Thank U for any help.

99% chance that a heavyweight database library is not going to even load without extreme patching for the browser.

Most public HTTPS-served use cases (other than maybe probably shouldn’t have random browsers (read: bot swarms) connecting to a real database.

Likely, whatever that database connection is doing needs to be hidden behind an API (e.g. REST, whatever) with the client kernel using JS fetch to talk to it, under the hood, with the JupyterLite application served next to it.

1 Like