Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Aug 5, 2017
1 parent 9f9ab81 commit b11d6dc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
10 changes: 2 additions & 8 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ S3 Info

You can retrieve S3 info via the ``s3`` namespace. Here's an example:

>>> info = s.getinfo(u'foo', namespaces=['s3'])
>>> info = s.getinfo('foo', namespaces=['s3'])
>>> info.raw['s3']
{u'content_length': 3, u'restore': None, u'sse_customer_key_md5': None, u'content_language': None, u'replication_status': None, u'server_side_encryption': None, u'parts_count': None, u'sse_customer_algorithm': None, u'missing_meta': None, u'delete_marker': None, u'content_encoding': None, u'accept_ranges': 'bytes', u'cache_control': None, u'metadata': {}, u'request_charged': None, u'e_tag': '"37b51d194a7513e45b56f6524f2d51f2"', u'expires': None, u'version_id': None, u'last_modified': 1501935315, u'content_type': 'binary/octet-stream', u'website_redirect_location': None, u'ssekms_key_id': None, u'content_disposition': None, u'storage_class': None, u'expiration': None}
{'metadata': {}, 'delete_marker': None, 'version_id': None, 'parts_count': None, 'accept_ranges': 'bytes', 'last_modified': 1501935315, 'content_length': 3, 'content_encoding': None, 'request_charged': None, 'replication_status': None, 'server_side_encryption': None, 'expires': None, 'restore': None, 'content_type': 'binary/octet-stream', 'sse_customer_key_md5': None, 'content_disposition': None, 'storage_class': None, 'expiration': None, 'missing_meta': None, 'content_language': None, 'ssekms_key_id': None, 'sse_customer_algorithm': None, 'e_tag': '"37b51d194a7513e45b56f6524f2d51f2"', 'website_redirect_location': None, 'cache_control': None}


URLs
Expand All @@ -86,12 +86,6 @@ URL from an S3 object. Here's an example:
>>> s3fs.geturl('foo')
'https://fsexample.s3.amazonaws.com//foo?AWSAccessKeyId=AKIAIEZZDQU72WQP3JUA&Expires=1501939084&Signature=4rfDuqVgmvILjtTeYOJvyIXRMvs%3D'

.. toctree::
:maxdepth: 2
:caption: Contents:

s3fs.rst


More Information
================
Expand Down
6 changes: 4 additions & 2 deletions fs_s3fs/_s3fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from fs.info import Info
from fs import errors
from fs.mode import Mode
from fs.path import basename, dirname, forcedir, normpath, relpath
from fs.path import basename, dirname, forcedir, join, normpath, relpath
from fs.time import datetime_to_epoch


Expand Down Expand Up @@ -285,7 +285,9 @@ def __repr__(self):
)

def __str__(self):
return self.__repr__()
return "<s3fs '{}'>".format(
join(self._bucket_name, relpath(self.dir_path))
)

def _path_to_key(self, path):
"""Converts an fs path to a s3 key."""
Expand Down
6 changes: 3 additions & 3 deletions fs_s3fs/opener.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# coding: utf-8
"""Defines the FTPOpener."""
"""Defines the S3FSpener."""

from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

__all__ = ['S3FSOpener']

from fs.opener import Opener, OpenerError
from fs.subfs import ClosingSubFS
from fs.opener import Opener
from fs.opener.errors import OpenerError

from ._s3fs import S3FS

Expand Down

0 comments on commit b11d6dc

Please sign in to comment.