Exemplo n.º 1
0
def main(req: func.HttpRequest) -> func.HttpResponse:
    logging.info('Python HTTP trigger function processed a request.')

    name = bar.f()

    if name:
        return func.HttpResponse(f"Hello {name}!")
    else:
        return func.HttpResponse(
            "Please pass a name on the query string or in the request body",
            status_code=400)
Exemplo n.º 2
0
# Python's module system

# A python file can be used as a module and creates
# a namespace.  A namespace is a name for a set of
# names

import bar
from bar import name
# from bar import *  # BAD!!!!

if __name__ == "__main__":
    bar.f()
    print(bar.name)
    print(name)
Exemplo n.º 3
0
import bar as foo

foo.f()
Exemplo n.º 4
0
import bar
bar.f(1,
      2,
      3)
Exemplo n.º 5
0
import bar
bar.f(1, 2, 3)