Skip to content

Commit 79e29c4

Browse files
kturciosalexellis
authored andcommitted
Update README
Signed-off-by: Kevin Turcios <[email protected]>
1 parent 3b8e568 commit 79e29c4

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

README.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
OpenFaaS Python Flask Templates
22
=============================================
33

4-
The Python Flask templates make use of the incubator project [of-watchdog](https://github.com/openfaas-incubator/of-watchdog) to handle higher throughput than the [classic watchdog](https://github.com/openfaas/faas/tree/master/watchdog) due to the process being kept warm.
4+
The Python Flask templates that make use of the incubator project [of-watchdog](https://github.com/openfaas-incubator/of-watchdog).
55

6-
Templates available under this repository:
6+
Templates available in this repository:
77
- python27-flask
88
- python3-flask
99
- python3-flask-armhf
10-
- python3-http*
11-
- python3-http-armhf*
10+
- python3-http
11+
- python3-http-armhf
1212

13-
Notes:
14-
- The templates listed with an asterik are the only ones that support additional control over the HTTP response and provide access to HTTP request details.
13+
Notes:
1514
- To build and deploy a function for Raspberry Pi or ARMv7 in general, use the language templates ending in *-armhf*
1615

1716
## Downloading the templates
@@ -65,12 +64,12 @@ The function handler is passed two arguments, *event* and *context*.
6564
- hostname
6665

6766
## Response Bodies
68-
By default, flask will automatically attempt to set the correct Content-Type header for you based on the type of response.
67+
By default, the template will automatically attempt to set the correct Content-Type header for you based on the type of response.
6968

7069
For example, returning a dict object type will automatically attach the header `Content-Type: application/json` and returning a string type will automatically attach the `Content-Type: text/html, charset=utf-8` for you.
7170

7271
## Example usage
73-
### Custom Status Codes and Response Bodies
72+
### Custom status codes and response bodies
7473
Successful response status code and JSON response body
7574
```python
7675
def handle(event, context):

template/python3-http-armhf/index.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def format_response(resp):
5656
return (body, statusCode, headers)
5757

5858
@app.route('/', defaults={'path': ''}, methods=['GET', 'PUT', 'POST', 'PATCH', 'DELETE'])
59-
@app.route('/<path:path>', methods=['GET', 'PUT', 'POST', 'PATCH' 'DELETE'])
59+
@app.route('/<path:path>', methods=['GET', 'PUT', 'POST', 'PATCH', 'DELETE'])
6060
def call_handler(path):
6161
event = Event()
6262
context = Context()

template/python3-http/index.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def format_response(resp):
5656
return (body, statusCode, headers)
5757

5858
@app.route('/', defaults={'path': ''}, methods=['GET', 'PUT', 'POST', 'PATCH', 'DELETE'])
59-
@app.route('/<path:path>', methods=['GET', 'PUT', 'POST', 'PATCH' 'DELETE'])
59+
@app.route('/<path:path>', methods=['GET', 'PUT', 'POST', 'PATCH', 'DELETE'])
6060
def call_handler(path):
6161
event = Event()
6262
context = Context()

0 commit comments

Comments
 (0)