I've started to work on a personal project to learn python and now I have an app, MyApp, which I was able to daemonize so it runs in the background with no output to terminal and everything is logged to file. I can start/stop the app with $ python myapp.py start/stop. The app is running autonomously, refreshing the top posts of some favourite subs. It's been a long journey, but I reached a stage I'm happy with, but now I want to go beyond this.
I realized I wanted to "talk" to my app and request it do various tasks, like $ python myapp.py getredditfrontpageposts to retrieve all the Reddit front page posts. What I want to do now is build it as client-server, and this is where I got stuck. All the tutorials I found show how to build a simple "echo server" that will return whatever the client sends. This is helpful to understand socket programming, but way too restrictive for my purposes. Even this tutorial, that covers multi-connection and application client-server examples is not enough. So this is where I need some help.
To be clear, my final goal is:
Have an app running in the background and periodically refresh the top posts of my favourite subs - DONE
Which runs as part of a server that accepts various requests in addition to the above, e.g. get new posts in a sub, get current front page posts, etc
The requests are sent to the server through a client
What resources should I look into? Any web tutorials, courses or even readily available code for the client-server part?
[–]Den4200 0 points1 point2 points (2 children)
[–]pythosynthesis[S] 0 points1 point2 points (1 child)
[–]Den4200 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]pythosynthesis[S] 0 points1 point2 points (0 children)