File tree 2 files changed +17
-2
lines changed
2 files changed +17
-2
lines changed 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
84
84
The source depends on 3rd party library ` rx ` and it is installed in the directory ` lib ` .
85
85
The test event in json format is in ` event.json ` file.
86
86
87
+ #### Installing ` rx ` library in ` lib/ `
88
+
89
+ ``` bash
90
+ pip install --target lib rx==1.6.1
91
+ ```
92
+
87
93
#### Content of ` test.py ` :
88
94
89
95
``` python
@@ -163,5 +169,6 @@ event = {
163
169
}
164
170
context = Context(5 )
165
171
166
- call(test.handler, event, context)
172
+ if __name__ == ' __main__' :
173
+ call(test.handler, event, context)
167
174
```
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``
90
90
and it is installed in the directory ``lib ``. The test event in json
91
91
format is in ``event.json `` file.
92
92
93
+ Installing ``rx `` library in ``lib/ ``:
94
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95
+
96
+ .. code :: bash
97
+
98
+ pip install --target lib rx==1.6.1
99
+
93
100
Content of ``test.py ``:
94
101
^^^^^^^^^^^^^^^^^^^^^^^
95
102
@@ -179,7 +186,8 @@ Sample
179
186
}
180
187
context = Context(5 )
181
188
182
- call(test.handler, event, context)
189
+ if __name__ == ' __main__' :
190
+ call(test.handler, event, context)
183
191
184
192
.. |Join the chat at https://gitter.im/HDE/python-lambda-local | image :: https://badges.gitter.im/Join%20Chat.svg
185
193
: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