Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roll back REAEDME changes (1234 -> port) #239

Merged
merged 1 commit into from
Oct 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ What?
... print(line)

>>> # stream from WebHDFS
>>> for line in smart_open('webhdfs://host:1234/user/hadoop/my_file.txt'):
>>> for line in smart_open('webhdfs://host:port/user/hadoop/my_file.txt'):
... print(line)

>>> # stream content *into* S3 (write mode):
Expand All @@ -56,17 +56,17 @@ What?
... fout.write(line)

>>> # stream content *into* HDFS (write mode):
>>> with smart_open('hdfs://host:1234/user/hadoop/my_file.txt', 'wb') as fout:
>>> with smart_open('hdfs://host:port/user/hadoop/my_file.txt', 'wb') as fout:
... for line in [b'first line\n', b'second line\n', b'third line\n']:
... fout.write(line)

>>> # stream content *into* WebHDFS (write mode):
>>> with smart_open('webhdfs://host:1234/user/hadoop/my_file.txt', 'wb') as fout:
>>> with smart_open('webhdfs://host:port/user/hadoop/my_file.txt', 'wb') as fout:
... for line in [b'first line\n', b'second line\n', b'third line\n']:
... fout.write(line)

>>> # stream using a completely custom s3 server, like s3proxy:
>>> for line in smart_open('s3u://user:secret@host:1234@mybucket/mykey.txt', 'rb'):
>>> for line in smart_open('s3u://user:secret@host:port@mybucket/mykey.txt', 'rb'):
... print(line.decode('utf8'))

>>> # you can also use a boto.s3.key.Key instance directly:
Expand Down