Skip to content

Commit 5defcb7

Browse files
committed
update description and readme file
1 parent dbb7263 commit 5defcb7

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

python/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ within a DSX Jupyter notebook, you can obtain your account credentials in the fo
3232
If your Object Storage was created with a Softlayer account, each part of the credentials will
3333
be found as text that you can copy and paste into the example code below.
3434

35-
### Softlayer Cloud Object Storage / Data Science Experience
35+
### Softlayer IBM Cloud Object Storage / Data Science Experience
3636
```python
3737
import ibmos2spark
3838

@@ -50,14 +50,13 @@ object_name = 'file1'
5050
data = sc.textFile(cos.url(object_name, bucket_name))
5151
```
5252

53-
### Bluemix Cloud Object Storage / Data Science Experience
53+
### Bluemix IBM Cloud Object Storage / Data Science Experience
5454
The class CloudObjectStorage allows you to connect to bluemix cos. You can connect to bluemix using api keys
5555
as follows:
5656

57-
```pythonw
57+
```python
5858
import ibmos2spark
5959

60-
# @hidden_cell
6160
credentials = {
6261
'endpoint': 'XXX',
6362
'api_key': 'XXX',
@@ -72,11 +71,10 @@ object_name = 'file_name'
7271
data = sc.textFile(cos.url(object_name, bucket_name))
7372
```
7473

75-
Alternatively, you can connect to bluemix cos using IAM token. Example:
76-
```pythonw
74+
Alternatively, you can connect to an IBM bluemix cos using IAM token. Example:
75+
```python
7776
import ibmos2spark
7877

79-
# @hidden_cell
8078
credentials = {
8179
'endpoint': 'XXX',
8280
'iam_token': 'eyJraWQXXXX .... X',

python/ibmos2spark/osconfig.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,18 +173,18 @@ class CloudObjectStorage(object):
173173
def __init__(self, sparkcontext, credentials, configuration_name='', cos_type='softlayer_cos', auth_method='api_key', bucket_name=''):
174174

175175
'''
176-
This class allows you to connect to a cloud object storage (COS) instance. It also support connecting to a cos instance
176+
This class allows you to connect to an IBM cloud object storage (COS) instance. It also support connecting to an IBM COS instance
177177
that is being hosted on bluemix.
178178
179179
sparkcontext: a SparkContext object.
180180
181181
credentials: a dictionary with the required keys to connect to cos. The required keys differ according
182-
to the type of cos.
183-
- for cos type "softlayer_cos" the following key are required:
182+
to the type of COS.
183+
- for COS type "softlayer_cos" the following key are required:
184184
* endpoint
185185
* access_key
186186
* secret_key
187-
- for cos type "bluemix_cos", here are the required/optional key:
187+
- for COS type "bluemix_cos", here are the required/optional key:
188188
* endpoint [required]
189189
* service_id [required]
190190
* api_key OR iam_token depends on the selected authorization method (auth_method) [required]
@@ -196,10 +196,10 @@ def __init__(self, sparkcontext, credentials, configuration_name='', cos_type='s
196196
multiple configurations to different Object Storage accounts.
197197
if a configuration name is not passed the default one will be used "service".
198198
199-
cos_type [optional]: string that identifies the type of cos to connect to. The supported types of cos
199+
cos_type [optional]: string that identifies the type of COS to connect to. The supported types of COS
200200
are "softlayer_cos" and "bluemix_cos". "softlayer_cos" will be chosen as default if no cos_type is passed.
201201
202-
auth_method [optional]: string that identifies the type of authorization to use when connecting to cos. This parameter
202+
auth_method [optional]: string that identifies the type of authorization to use when connecting to an IBM COS. This parameter
203203
is not reqired for softlayer_cos but only needed for bluemix_cos. Two options can be chosen for this params
204204
"api_key" or "iam_token". "api_key" will be chosen as default if the value is not set.
205205

0 commit comments

Comments
 (0)