New to cloud hosting in Azure, recently created a flask webapp that will open, if not generate a txt file(with root directory), but i dont think if there is any way to access that file? i have not created or subscribed to any storage services provided by azure yet. Will i be charged since the file is technically stored somewhere but i cant access it?
I have created a flask app which creates a text.txt
file and deployed it to web app in Azure using VS code.
you can get the created file inside the file output.tar.gz
.
app.py
:
from flask import Flask
app=Flask(__name__)
@app.route('/')
def Hello():
text ='hello, File created using flask app'
with open('text.txt', 'w') as file:
file.write(text)
return "this is a Flask app"
if __name__=="__main__":
app.run()
deployment
:
OUTPUT
:
https://yourwebappname.scm.azurewebsites.net/newui
.File Manager
, go to directory site/wwwroot
and download the output.tar.gz
file.text.txt
file will be available inside the file. as shown below.