Apache communication with Python Script

Apache communication with Python Script

Postby Antoine » Mon Jul 08, 2013 7:00 pm

Hello everyone.
I know my question can be strange, or stupid, because i've got zero experience in python. I have in project to start to learn it but before I need to know if I can do what I want, or if what I want is bad and should not be done.
So :
I want to have an apache server. This server will be hosting a web application, surely in python (django ?).
But I will need the server to often updates the database.
So, I thinked about a python script running on the computer wich make updates. And what about the webapp communicate with this script ? Asking permissions to do something, etc..
What do you think of that ?
Is this stupid ? I know this isn't very clear.
Thanks you and sorry if I disturbed you
Antoine
 
Posts: 2
Joined: Mon Jul 08, 2013 6:33 pm

Re: Apache communication with Python Script

Postby ochichinyezaboombwa » Mon Jul 08, 2013 9:42 pm

This is something that's been routinely done in Python (with or without Django).
ochichinyezaboombwa
 
Posts: 200
Joined: Tue Jun 04, 2013 7:53 pm

Re: Apache communication with Python Script

Postby Antoine » Mon Sep 09, 2013 9:53 am

Thanks for your answer.

Here is more information about what I want to do :
I need an application who manage users and their different actions. A user is also a human on his laptop. So eventually the application will need to send data very quickly to this clients, to simulate a "live".
In parallel, the application will need regular administration tasks, either manuals or automatics.

So here is how I imagine the application :
- A python script, wich corresponds to the server application. I want it to can be directed manually by linux shell, like "myapp start" or "myapp do-this with-these-parameters". So a Linux Daemon can be launched to execute automatics tasks, like ask for disconnect the inactive users. I read that daemons can be written in Python, but I also read that it's better to use the already working linux ones.
This python script will interact with a BDD to keep permanent data.
- Perhaps I will use an Apache as a gateway between the application and the clients. I don't know yet especially because I don't already know how I'll make the client-side application (native, integrated in a web-browser, available for mobiles.. ?).

So finally here are my questions :
- Do you think my choices are good, relative to my purposes ?
- Do you have informations about communication between shell and a python script ? I mean, not just launching it with parameters, but a true interaction, especially after launched ? Do I have to use a "Service" or something ?

Thanks you very much. I apologize if my questions are common or unclear. I swear I make a lot of searches, and read a lot of documentation. Problem is I'm still pretty noob and this application is like a "first flight".
Antoine
 
Posts: 2
Joined: Mon Jul 08, 2013 6:33 pm


Return to Web Development

Who is online

Users browsing this forum: No registered users and 3 guests

cron