{"id":13585956,"url":"https://github.com/kobayashi/s3monkey","last_synced_at":"2025-04-07T14:32:55.246Z","repository":{"id":42425955,"uuid":"122352563","full_name":"kobayashi/s3monkey","owner":"kobayashi","description":"A Python library that allows you to interact with Amazon S3 Buckets as if they are your local filesystem.","archived":true,"fork":false,"pushed_at":"2022-12-08T03:13:08.000Z","size":317,"stargazers_count":402,"open_issues_count":11,"forks_count":13,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-04-01T14:58:56.318Z","etag":null,"topics":["fs","fuse","mock","monkeypatching","python","s3"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kobayashi.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-21T15:17:13.000Z","updated_at":"2025-03-30T17:33:17.000Z","dependencies_parsed_at":"2023-01-24T21:15:12.694Z","dependency_job_id":null,"html_url":"https://github.com/kobayashi/s3monkey","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kobayashi%2Fs3monkey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kobayashi%2Fs3monkey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kobayashi%2Fs3monkey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kobayashi%2Fs3monkey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kobayashi","download_url":"https://codeload.github.com/kobayashi/s3monkey/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247670233,"owners_count":20976532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fs","fuse","mock","monkeypatching","python","s3"],"created_at":"2024-08-01T15:05:14.745Z","updated_at":"2025-04-07T14:32:54.971Z","avatar_url":"https://github.com/kobayashi.png","language":"Python","readme":"s3monkey: Access your S3 buckets like they're native files\n==========================================================\n\nPlatforms like `Heroku \u003chttps://heroku.com/\u003e`_ don't allow for FUSE filesystem\nusage, so I had to get a bit creative.\n\nIntroducing, **s3monkey**, a library that mocks out all standard Python library\nsystem file operations, allowing you to use already–written code to interface\nwith Amazon S3.\n\nAll standard library file operation modules are patched when using the provided\ncontext manager, including the built–in ``open``, ``os``, ``io``, \u0026 ``pathlib``.\n\nIf you're interested in financially supporting Kenneth Reitz open source, consider `visiting this link \u003chttps://cash.me/$KennethReitz\u003e`_. Your support helps tremendously with sustainability of motivation, as Open Source is no longer part of my day job.\n\n\nPotential Use Cases\n-------------------\n\n- Running Jupyter Notebooks on non-persistient storage (still being worked out).\n- Storing user uploads for Django applications (e.g. the ``media`` folder). \n\nUsage\n-----\n\n``AWS_ACCESS_KEY_ID`` and ``AWS_SECRET_ACCESS_KEY`` are expected to be set:\n\n.. code-block:: shell\n\n    $ AWS_ACCESS_KEY_ID=xxxxxxxxxxx\n    $ AWS_SECRET_ACCESS_KEY=xxxxxxxxxxx\n\nBasic usage:\n\n.. code-block:: python\n\n    from s3monkey import S3FS\n\n    with S3FS(bucket='media.kennethreitz.com', mount_point='/app/data') as fs:\n\n        # Create a 'test' key on S3, with the contents of 'hello'.\n        with open('/app/data/test', 'w') as f:\n            f.write('hello')\n\n        # List the keys in the S3 bucket.\n        print(os.listdir('/app/data'))\n        # ['file1.txt', 'file2.txt', 'file2.txt', 'test', …]\n\nInstallation\n------------\n\n.. code-block:: shell\n\n    $ pipenv install s3monkey\n\nThis module only supports Python 3.\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkobayashi%2Fs3monkey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkobayashi%2Fs3monkey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkobayashi%2Fs3monkey/lists"}