I'm writing a website using Google Apps Engine Python, and a friend has written some code that he has kindly shared with me that I want to use that's written in PHP. Basically it draws diagrams given some code, and should save an image for it if it doesn't exist.
I've got that code stored in my database in a variable called Diagram_Code, and I want the diagram to render on the page. I'm using jinja to do my templating. I expect I'll have two directories somehow, one with the code in it, and another one with the saved diagrams which are an md5(Diagram_Code).jpg.
I've looked at the documentation for the app.yaml, but I don't understand how I should include it there, if I should.
I'm expecting my python might look something like this:
if not "/diagrams",md5(Diagram_Code),".jpg": #Check if diagram exists already
FUNCTION_TO_USE_PHP(Diagram_Code) #Make diagram with some function
img_url="/diagrams/",md5(Diagram_Code),".jpg"
How should I include it in my app.yaml, and how do I call it in my Python code if this is possible? and if not, what might be the best solution to be able to use what is in the PHP?