[Flask] Question of outsourcing flask app

matar fall matfall94 at gmail.com
Tue Jun 4 14:50:35 EDT 2019


Got it.
Thank You for sharing your knowledge.
I will handle and take into account all your suggestions.
Regards.

Le mar. 4 juin 2019 à 19:35, keith macdonald <keith at the-sanctuary.biz> a
écrit :

> I agree with Adil about the security risk - how would you know what's in
> the
> remote file *before* it gets used?
>
> But, if you must go that route, how about running a Curl command from
> inside
> the Python code, just before the Flask app is initialized? With the Curl
> program saving the file to somewhere local.
>
> For example:
>
> # get remote file
> import os
> cmd = "C:/Curl/curl.exe www.test.fr/config.py -o C:/Download/config.py
> # or (instead of a Download folder) whatever folder is good for the local
> code.
> os.system(cmd)
>
> # now start Flask app
> import config as config
> from flask import Flask
> app = Flask(__name__)
>
> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20190604/b343d89d/attachment.html>


More information about the Flask mailing list