File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,6 +84,12 @@ The handler's code is in `test.py` and the function name of the handler is `hand
8484The source depends on 3rd party library ` rx ` and it is installed in the directory ` lib ` .
8585The test event in json format is in ` event.json ` file.
8686
87+ #### Installing ` rx ` library in ` lib/ `
88+
89+ ``` bash
90+ pip install --target lib rx==1.6.1
91+ ```
92+
8793#### Content of ` test.py ` :
8894
8995``` python
@@ -163,5 +169,6 @@ event = {
163169}
164170context = Context(5 )
165171
166- call(test.handler, event, context)
172+ if __name__ == ' __main__' :
173+ call(test.handler, event, context)
167174```
Original file line number Diff line number Diff line change @@ -90,6 +90,13 @@ handler is ``handler``. The source depends on 3rd party library ``rx``
9090and it is installed in the directory ``lib ``. The test event in json
9191format is in ``event.json `` file.
9292
93+ Installing ``rx `` library in ``lib/ ``:
94+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95+
96+ .. code :: bash
97+
98+ pip install --target lib rx==1.6.1
99+
93100 Content of ``test.py ``:
94101^^^^^^^^^^^^^^^^^^^^^^^
95102
@@ -179,7 +186,8 @@ Sample
179186 }
180187 context = Context(5 )
181188
182- call(test.handler, event, context)
189+ if __name__ == ' __main__' :
190+ call(test.handler, event, context)
183191
184192 .. |Join the chat at https://gitter.im/HDE/python-lambda-local | image :: https://badges.gitter.im/Join%20Chat.svg
185193 :target: https://gitter.im/HDE/python-lambda-local?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
You can’t perform that action at this time.
0 commit comments