Skip to content

Commit 55cd378

Browse files
committed
Updated readme
1 parent 96f394f commit 55cd378

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ import pywren_ibm_cloud as pywren
298298

299299
bucket_name = 'my_data_bucket'
300300

301-
def my_map_function(bucket, key, data_stream):
301+
def my_map_function(bucket, key, data_stream, ibm_cos):
302302
for line in data_stream:
303303
# Do some process
304304
return partial_intersting_data
@@ -320,7 +320,7 @@ result = pw.get_result()
320320
| method | method signature |
321321
|---| ---|
322322
| `pw.map_reduce`(`my_map_function`, `bucket_name`, `my_reduce_function`, `chunk_size`)| `bucket_name` contains the name of the bucket |
323-
| `my_map_function`(`bucket`, `key`, `data_stream`) | `key` is a data object from bucket `bucket` that is assigned to the invocation|
323+
| `my_map_function`(`bucket`, `key`, `data_stream`, `ibm_cos`) | `key` is a data object from `bucket` that is assigned to the invocation. `ibm_cos` is an optional parameter which provides a `boto3_client` (see [here](#geting-boto3-client-from-any-map-function))|
324324

325325

326326

@@ -363,7 +363,7 @@ pw.map_reduce(my_map_function, bucket_name, my_reduce_function,
363363
```
364364

365365
### Geting boto3 client from any map function
366-
Any map function can get `ibm_cos` which is [boto3_client](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#client). This allows you to access your IBM COS account from any map function, for example:
366+
Any map function can get `ibm_cos` parameter which is [boto3_client](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#client). This allows you to access your IBM COS account from any map function, for example:
367367

368368
```python
369369
import pywren_ibm_cloud as pywren

0 commit comments

Comments
 (0)