Skip to content

Commit

Permalink
Fix examples to indicate that we should be using streams. (#403)
Browse files Browse the repository at this point in the history
Fixes #402
  • Loading branch information
harshavardhana authored Sep 7, 2016
1 parent def88f9 commit b0bbc8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ __Return Value__

|Param |Type |Description |
|:---|:---|:---|
|``object`` | _io.IOBase_ |Represents object reader. |
|``object`` | _urllib3.response.HTTPResponse_ |Represents http streaming reader. |

__Example__

Expand All @@ -346,7 +346,7 @@ __Example__
try:
data = minioClient.get_object('mybucket', 'myobject')
with open('my-testfile', 'wb') as file_data:
for d in data:
for d in data.stream(32*1024):
file_data.write(d)
except ResponseError as err:
print(err)
Expand All @@ -370,7 +370,7 @@ __Return Value__

|Param |Type |Description |
|:---|:---|:---|
|``object`` | _io.IOBase_ |Represents object reader. |
|``object`` | _urllib3.response.HTTPResponse_ |Represents http streaming reader. |

__Example__

Expand Down
2 changes: 1 addition & 1 deletion examples/get_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
try:
data = client.get_object('my-bucketname', 'my-objectname')
with open('my-testfile', 'wb') as file_data:
for d in data:
for d in data.stream(32*1024):
file_data.write(d)
except ResponseError as err:
print(err)

0 comments on commit b0bbc8b

Please sign in to comment.