Forums

Pythonanywhere integration with Another application

Dear All,

I have deployed my "Django App" on pythonanywhere and it works successfully(Database and everything).

I have another application app2 "also developed in Python" which depends on the output of the first deployed Django app.

How can I send this output to that other server (app2). like I have Images and text files which my "app2" need to have access.

"I know about URLLIB" and other url retrieves command. but how Pythonanywhere would allow it as it require Password and User name."

thanks in advance

If you're serving the generated files through your web app, you can control whether they are secured with a username and password or not. You don't need to worry about the PythonAnywhere username and password.

Let suppose I have to access this URL "https://www.pythonanywhere.com/user/culhapartners/files/home/culhapartners/config.txt"

when I retrieve it using "urrllib tools" it download the html markups etc. and not the text file data

What HTML markup? My guess is you're getting a "Not authorised" error. You can do the login to PythonAnywhere through urllib and save the auth cookie and so on, but it would be better if your first web app served the data that the second one needs, then you could limit access to only the files that the second web app needs instead of exposing your entire PythonAnywhere account to the second web app.