Skip to content

rahul29041995/python-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-sample

Create main.py

from flask import Flask

app = Flask(name)

@app.route("/") def index(): return "Congratulations, it's a web app!"

Create requirements.txt

Flask==2.1.2

Create app.yaml

runtime: python310

####### Test Locally ####### python -m venv venv venv/bin/activate python3 -m pip install -r requirements.txt

Add the below script to main.py

if name == "main": app.run(host="127.0.0.1", port=8080, debug=True)

Execute : python main.py

O/P

  • Serving Flask app "main" (lazy loading)
  • Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Debug mode: on
  • Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)
  • Restarting with stat
  • Debugger is active!
  • Debugger PIN: 315-059-987

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages