Skip to content

Commit

Permalink
Fix syntax in README
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenvdv committed Oct 16, 2018
1 parent 845b6d5 commit fb43695
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ https://github.com/techjacker/flask-lambda

Improvements:

* Expose original input event from AWS on Flask's request object
* Production-grade logging
* Expose original input event from AWS on Flask's request object
* Production-grade logging


Requirements
------------

* Python 3.6+
* Python 3.6+
* Flask 0.10+


Installation
Expand All @@ -31,13 +32,13 @@ Here is an example of what a Flask app using this library would look like::

.. code-block:: python
from flask_lambda import FlaskLambda
from flask_lambda import FlaskLambda
app = FlaskLambda(__name__)
app = FlaskLambda(__name__)
@app.route('/foo', methods=['GET', 'POST'])
def foo():
@app.route('/foo', methods=['GET', 'POST'])
def foo():
data = {
'form': request.form.copy(),
'args': request.args.copy(),
Expand All @@ -50,13 +51,13 @@ Here is an example of what a Flask app using this library would look like::
)
if __name__ == '__main__':
if __name__ == '__main__':
app.run(debug=True)
You can access the original input event on Flask application context::

.. code-block:: python
from flask import request
from flask import request
assert request.aws_event['input']['httpMethod'] == 'POST'
assert request.aws_event['input']['httpMethod'] == 'POST'

0 comments on commit fb43695

Please sign in to comment.