paten 0.1.3

Last updated:

0 purchases

paten 0.1.3 Image
paten 0.1.3 Images
Add to Cart

Description:

paten 0.1.3

Paten




Paten is a framework for azure functions written in Python. Paten provides:

A command line tool for creating, building, deploying azure functions.
A decorator based API integrated with in/out bindings.

install
install paten package.
$ pip install paten

In addition, Azure CLI and Azure Functions Core Tools are required.
See below to install the libraries.

Azure CLI
Azure Functions Core Tools

preparation
Before deploying to Azure, az login is required.
$ az login

You have logged in. Now let us find all the subscriptions to which you have access...

Quickstart
In your project directory, type below.
Directory {function_app_name} and example python scripts are created.
$ paten new-app {function_app_name}

Then, modify app.py, like below.
import azure.functions as func
from paten import Paten

app = Paten('{function_app_name}')


@app.http_trigger('req', methods=['GET'], route='/')
@app.out_http()
def example_http_function(req: func.HttpRequest) -> func.HttpResponse:
name = req.params.get('name')

# response
return func.HttpResponse(name)

Before deploying to azure functions, you can test your functions on local with the command below.
$ paten local

Finally, to deploy to azure functions, type below in the directory {function_app_name}.
The files are generated in ./{function_app_name}/.paten and your function app is deployed to azure.
$ paten deploy

support bindings



services
trigger
in
out




http
O
-
O


blob
O
X
X


queue
O
X
0


timer
O
-
-




O: supported
X: not supported yet
-: officially not supported

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.