Skip to content

Commit d8fdb13

Browse files
committed
docs, urls namespace
1 parent ac274a9 commit d8fdb13

5 files changed

Lines changed: 21 additions & 3 deletions

File tree

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ Amazon S3 cloud storage.
66

77
As a PyFilesystem concrete class, S3FS allows you to work with S3 in the
88
same as any other supported filesystem.
9+
10+
`Documentation <http://fs-s3fs.readthedocs.io/en/latest/>`__

docs/index.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,17 @@ There are two options for constructing a :ref:`s3fs` instance. The simplest way
3434
is with an *opener*, which is a simple URL like syntax. Here is an example::
3535

3636
from fs import open_fs
37-
s3fs = S3FS('s3://mybucket/')
37+
s3fs = open_fs('s3://mybucket/')
3838

3939
For more granular control, you may import the S3FS class and construct
4040
it explicitly::
4141

4242
from fs_s3fs import S3FS
4343
s3fs = S3FS('mybucket')
4444

45+
See :class:`~fs_s3fs.S3FS` for other arguments you may pass to the
46+
constructor.
47+
4548

4649
Authentication
4750
==============

fs_s3fs/_s3fs.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,19 @@ def _info_from_object(self, obj, namespaces):
376376
value = datetime_to_epoch(value)
377377
s3info[name] = value
378378

379+
if 'urls' in namespaces:
380+
url = self.client.generate_presigned_url(
381+
ClientMethod='get_object',
382+
Params={
383+
'Bucket': self._bucket_name,
384+
'Key': key
385+
}
386+
)
387+
info['urls'] = {
388+
'download': url
389+
}
390+
391+
379392
return info
380393

381394
def getinfo(self, path, namespaces=None):

fs_s3fs/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.1.1"
1+
__version__ = "0.1.2a0"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
REQUIREMENTS = [
2626
"boto3~=1.4.5",
27-
"fs==2.0.7",
27+
"fs~=2.0.7",
2828
"six~=1.10.0"
2929
]
3030

0 commit comments

Comments
 (0)