Skip to content

Repository files navigation


Logo

Flask Backend Tutorial

Simple Flask app with Google Cloud Functions deployment.

Table of Contents

Watch the video

About

Flask backend boilerplate with multiple endpoints and Google Cloud Functions deployment support.

Built with:

  • Flask
  • Google Cloud Functions (Gen 2)
  • Python 3.11

Getting Started

Local development:

pip install -r requirements.txt
python app.py

Server runs at http://localhost:5000

Try the API: See example/demo.ipynb for example requests.

Deployment

Deploy to Google Cloud Functions:

  1. Configure .env:

    cp .env.example .env
    # Edit .env with your GCP settings
  2. Deploy:

    ./deploy-gcf.sh  # Linux/Mac
    deploy-gcf.bat   # Windows

See docs/deploy-cloud-functions.md for details.

Endpoints

  • GET / - Hello message
  • GET /health - Health check
  • GET /test?lat=<lat>&lon=<lon> - Test endpoint with location parameters
  • POST /echo - Echo JSON payload

Documentation

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages