Metadata-Version: 2.0
Name: s3monkey
Version: 0.1.0
Summary: A Python library that allows you to interact with Amazon S3 Buckets as if they are your local filesystem.
Home-page: https://github.com/kennethreitz/pyS3fs
Author: Kenneth Reitz
Author-email: me@kennethreitz.org
License: MIT
Description-Content-Type: UNKNOWN
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Dist: chardet
Requires-Dist: bucketstore


s3monkey: Access your S3 buckets like they're native files
========-=================================================

Platforms like `Heroku <https://heroku.com/>`_ don't allow for FUSE filesystem
usage, so I had to get a bit creative.

Introducing, **s3monkey**, a library that mocks out all standard Python library
system file operations, allowing you to use already–written code to interface
with Amazon S3.

All standard library file operation modules are patched when using the provided
context manager, including ``os``, ``io``, & ``pathlib``.

Usage
-----

``AWS_ACCESS_KEY_ID`` and ``AWS_SECRET_ACCESS_KEY`` are expected to be set:

.. code-block:: shell

    $ AWS_ACCESS_KEY_ID=xxxxxxxxxxx
    $ AWS_SECRET_ACCESS_KEY=xxxxxxxxxxx

Basic usage:

.. code-block:: python

    from s3monkey import S3FS

    with S3FS(bucket='media.kennethreitz.com', mount_point='/app/data') as fs:

        # Create a 'test' key on S3, with the contents of 'hello'.
        with open('/app/data/test', 'w') as f:
            f.write('hello')

        # List the keys in the S3 bucket.
        print(os.listdir('/app/data'))
        # ['file1.txt', 'file2.txt', 'file2.txt', 'test', …]






