paten
Project description
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.
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
Built Distribution
File details
Details for the file paten-0.1.3.tar.gz
.
File metadata
- Download URL: paten-0.1.3.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6af4a86ef40138fe7e5672aea937a46cc106a20e39b23aa8f2d43adc9ed88ae2 |
|
MD5 | d27257dc0870874f97a8d171c32ca034 |
|
BLAKE2b-256 | 69eca59545347b77f0186c9a5d9c51e3fe004c00ce27506d4b63c4a5a8a50218 |
File details
Details for the file paten-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: paten-0.1.3-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5ec5a40c02879e2347da34537b508991b051350320567a03cea667313f7614d |
|
MD5 | cfbc6840faa09ceee3e8bc34f9f017a5 |
|
BLAKE2b-256 | 181fb7433a6a26d7bbcc6b57aefa7e9dc145b2022b476a92a473105ac4d182e9 |