There is a module that's only available for JS, but my project is written in Python and it will be impossible to transfer it to JS at this point. Is there a way to transfer the data from JS without setting up a server?
Asked
Active
Viewed 279 times
1
-
It's a bit unclear what you're asking. Where is the data? What kind of data are you attempting to retrieve? If the data you're working with is in a database(from how the question sounds), the language used to access the database is not as important. It would help to include an [example](https://stackoverflow.com/help/minimal-reproducible-example) to illustrate what you're trying to do. – Joe Feb 24 '21 at 19:52
-
I'm using discord py to make a bot. I want it to take a word and give it to a function in js (because there is a module that only works on js that gives the results I need) the function takes a word and searches it in a website and returns a list of all the information about it, for example, the function takes the word "happy" and returns the first video title that has this word, as well as a description, thumbnail URL, video file, and so on) – Aiotex Feb 24 '21 at 20:36
-
The problems resides in the impossibility for you to launch the js script (presumably locally on your machine), and then having it to open a Python script with args. Browser-driven versions of JavaScript won't allow you to interact with your os environment, differently from Node.js, but again... that runs on a server, which can however be your local machine – BiOS Feb 24 '21 at 20:43
1 Answers
3
The short answer is no. Python and JavaScript may work together by implementing frameworks like Flask and Django, but to set up those you do need a server.
You may however set up a Node.js installation on your local machine and then having it start your Python script, with arguments being the product of your JS function, by following this example.

BiOS
- 2,282
- 3
- 10
- 24