Skip to main content

paten

Project description

Paten

pytest codecov PythonVersion PiPY

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.

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

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

paten-0.1.3.tar.gz (11.0 kB view hashes)

Uploaded Source

Built Distribution

paten-0.1.3-py3-none-any.whl (12.1 kB view hashes)

Uploaded Python 3

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