Skip to content

Include section about Flask routing #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

thrykol
Copy link

@thrykol thrykol commented Feb 10, 2021

Adds documentation around how to set up Flask routing when using functions_framework.

@google-cla google-cla bot added the cla: yes label Feb 10, 2021
@di
Copy link
Member

di commented Feb 17, 2021

Hi @thrykol, thanks for the PR. At this time, this isn't a pattern that we want to explicitly support. You're welcome to continue using it but be aware that it may not continue working in exactly the same way in the future. Generally if you need multiple endpoints or routing, we recommend migrating to Cloud Run instead.

@di di closed this Feb 17, 2021
@thrykol
Copy link
Author

thrykol commented Feb 17, 2021

@di I thought that may be the case so no worries. My use case is already using functions_framework in Cloud Run for Anthos. Would it make sense to promote the functionality specifically for Cloud Run?

@di
Copy link
Member

di commented Feb 17, 2021

Hi @thrykol, just curious, if you're using Flask's routing features like this as well as Cloud Run, what advantage are you getting from using the Functions Framework as well? You should be able to just deploy the same app to Cloud Run without using Functions Framework as a middleman.

@thrykol
Copy link
Author

thrykol commented Feb 17, 2021

@di I started out in with Python in Cloud Functions but moved to Cloud Run managed and then Cloud Run for Anthos. So between evolution and not having a strong background in Python, functions framework provided a nice abstraction layer. And once I started using functions framework, new functions ended up using existing ones as a template. It's only recently that I wanted to make use of routing which resulted in this PR.

@di
Copy link
Member

di commented Feb 17, 2021

Got it! Thanks make sense, thanks for sharing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants