How to call function on client from server?
See original GitHub issueI am trying to replace the eel package with the guy package. One thing I can not understand from the documentation is how I would go about calling a function on the client (javascript) from my python backend. So what I am trying to do is: Python:
def print_on_client(message):
guy.call("print", message)
print_on_client("hello world")
Javascript:
function print(message){
console.log(message);
}
I would expect the client printing “hello world” in the console. What would be the correct way to achieving this?
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
How to call a server-side function from client-side?
It is possible to call server-side functions in client-side code using the ~% syntax. For security reasons, these functions must first be declared ......
Read more >Calling a client side function from server side in node.js
If it's necessary to call client side function from server then you will need some kind of open connection like Websockets, and on...
Read more >How to call server side function on client side - MSDN - Microsoft
Hi, How to call server side function on client side? here i want to call change() function on textbox onchange event. <script language=" ......
Read more >Solved: How to call function from server to html
I can do this on client script, but its not working on server script. HTML : <button ng-click="c.data.getcc()"> search </button> <span> ...
Read more >How to call Server function from client on a level placed ...
I have an Actor placed on a level, and I would like to be able to call a Server function from a client....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The 0.4.3 is here … See : https://github.com/manatlan/guy/blob/master/testEelHelloWorld.py
I will update the doc 😉 … it’s a nice feature
Stay tuned …
coz, the next version will implement a way to call directly a js method … from py side, without using events (I’m making a layer on top of that, to abstract the concept)
you could use :
in place of :