Skip to main content

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

Release files for paten 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for paten 0.1.3
File Size Uploaded
paten-0.1.3.tar.gz 11.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for paten 0.1.3
File Interpreter ABI Platform
paten-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 23.1 kB

Release files / paten-0.1.3.tar.gz

Download URL paten-0.1.3.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6af4a86ef40138fe7e5672aea937a46cc106a20e39b23aa8f2d43adc9ed88ae2
BLAKE2b-256 checksum
How to use checksums
69eca59545347b77f0186c9a5d9c51e3fe004c00ce27506d4b63c4a5a8a50218
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release files / paten-0.1.3-py3-none-any.whl

Download URL paten-0.1.3-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5ec5a40c02879e2347da34537b508991b051350320567a03cea667313f7614d
BLAKE2b-256 checksum
How to use checksums
181fb7433a6a26d7bbcc6b57aefa7e9dc145b2022b476a92a473105ac4d182e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page