Q:

How to get parameters from root function

I have the code below:
from flask import Flask

app = Flask(__name__)

@app.route("/<param1>", methods=["GET"])
def func1(param1):
    return func2()

def func2():
    return "mystring"

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=8080, debug=True)

The question is how to pass param1 to func2 but not as a function parameter.  In my project func2() is in another module and I have a lot of parameters in my URL.  Can I have access to param1 from func2 for example via flask.request or something like this? 
Yes I know that i can put all necessary parameters into a dictionary and pass this dictionary to func2 and to another function, but I would like to know if there is another way to access url-parameters. 

A:

Flask provides a variable g that exists for the lifetime of the request.  Depending on your situation, this may be an appropriate use for it. 
To use it, import it:
from flask import g

In your example:
@app.route("/<param1>", methods=["GET"])
def func1(param1):
    g.info = "Hello world"
    return func2()

def func2():
    if g.info == "Hello world":
        return "Hello world"
    return "mystring"

Note: This variable is automatically available to the template, which may not be desirable.