Skip to main content

Run multiple endpoints on Google Cloud Functions and Amazon Lambda

Project description

Run multiple endpoints on Google Cloud Functions and Amazon Lambda

This example show how to run multiple endpoints on Google Cloud Functions and Amazon Lambda.

By default, functions-framework-python can't run multiple endpoints on the same function.

I present two examples here:

Get started

Install the dependencies:

pip install functions_wrapper
# main.py 
from flask import Flask
from functions_wrapper import entrypoint

app = Flask(__name__)

@app.route("/")
def home():
    return "Hello World!"

@app.route("/test")
def test():
    return "Hello Test!"

app_wrap = lambda request: entrypoint(app, request)

Run this file with functions-framework:

functions_framework --target app_wrap

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

functions_wrapper-1.0.2.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

functions_wrapper-1.0.2-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file functions_wrapper-1.0.2.tar.gz.

File metadata

  • Download URL: functions_wrapper-1.0.2.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for functions_wrapper-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d182e3e601d9b1a30ecd03dd1bd01727c86a83def30de583fbd7543d0d7ae7b8
MD5 36c45824f1aa6029b0717365cb4441af
BLAKE2b-256 b71e3cdea311c4de377af0909f3bae9076b11bf17ec6d7577b9337c07f7322fc

See more details on using hashes here.

File details

Details for the file functions_wrapper-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for functions_wrapper-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 81cdd33686224a08f82522c792c37617ffb48d3f01cb94470cf3616416f53a59
MD5 24136f042f10e1b4141a9698aecc12f3
BLAKE2b-256 39ac732946977a7abcb42173206885d13eb56052bf7b2d7f5a358343bbe3927a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page