Name | s3-reader JSON |
Version |
0.3.8
JSON |
| download |
home_page | None |
Summary | Python library to read S3 file as local file. |
upload_time | 2025-01-29 06:34:13 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | None |
keywords |
aws
file
read
s3
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# s3-reader
[](https://github.com/rcmdnk/s3-reader/actions/workflows/test.yml)
[](https://github.com/rcmdnk/s3-reader/tree/coverage)
Python library to read S3 file as local file.
## Requirement
- Python 3.9, 3.10, 3.11
## Installation
```bash
$ pip install s3-reader
```
## Usage
```
from s3_reader import File
def check_s3_file(path):
file = File(path)
with open(file.path) as f:
...
check_s3_file('s3://<bucket>/path/to/file')
```
In this example, the S3 file is downloaded when `file = File(path)` is
executed, and it is stored as a temporary file.
`file.path` refers to the path of the locally stored temporary file.
At the end of the `check_s3_file` function, the file object is deleted, and
consequently, the temporary file is also deleted.
If path refers to a local file instead of an S3 file, File simply copies the
path, and you can use the File object in the same manner.
Raw data
{
"_id": null,
"home_page": null,
"name": "s3-reader",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "aws, file, read, s3",
"author": null,
"author_email": "rcmdnk <rcmdnk@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/6d/04/67366d9f2a42b6c4b87854724417f6274ff5fb6422df1cec55fbcccfbb26/s3_reader-0.3.8.tar.gz",
"platform": null,
"description": "# s3-reader\n\n[](https://github.com/rcmdnk/s3-reader/actions/workflows/test.yml)\n[](https://github.com/rcmdnk/s3-reader/tree/coverage)\n\nPython library to read S3 file as local file.\n\n## Requirement\n\n- Python 3.9, 3.10, 3.11\n\n## Installation\n\n```bash\n$ pip install s3-reader\n```\n\n## Usage\n\n```\nfrom s3_reader import File\n\n\ndef check_s3_file(path):\n file = File(path)\n\n with open(file.path) as f:\n ...\n\ncheck_s3_file('s3://<bucket>/path/to/file')\n\n```\n\nIn this example, the S3 file is downloaded when `file = File(path)` is\nexecuted, and it is stored as a temporary file.\n\n`file.path` refers to the path of the locally stored temporary file.\n\nAt the end of the `check_s3_file` function, the file object is deleted, and\nconsequently, the temporary file is also deleted.\n\nIf path refers to a local file instead of an S3 file, File simply copies the\npath, and you can use the File object in the same manner.\n",
"bugtrack_url": null,
"license": null,
"summary": "Python library to read S3 file as local file.",
"version": "0.3.8",
"project_urls": {
"Documentation": "https://github.com/rcmdnk/s3-reader",
"Homepage": "https://github.com/rcmdnk/s3-reader",
"Issue": "https://github.com/rcmdnk/s3-reader/issues",
"Repository": "https://github.com/rcmdnk/s3-reader"
},
"split_keywords": [
"aws",
" file",
" read",
" s3"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "69a6b8a157660b22f34aef18d8c572f952892c4f3e278a4b9e9007630bc4774d",
"md5": "07cc940cd3e026abe9afabc3f83a3f87",
"sha256": "09f24252141598c69b392b469f6deb37a6a2aa1acdf8ad4326ca7a127041ec30"
},
"downloads": -1,
"filename": "s3_reader-0.3.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "07cc940cd3e026abe9afabc3f83a3f87",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 8076,
"upload_time": "2025-01-29T06:34:12",
"upload_time_iso_8601": "2025-01-29T06:34:12.080728Z",
"url": "https://files.pythonhosted.org/packages/69/a6/b8a157660b22f34aef18d8c572f952892c4f3e278a4b9e9007630bc4774d/s3_reader-0.3.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "6d0467366d9f2a42b6c4b87854724417f6274ff5fb6422df1cec55fbcccfbb26",
"md5": "3ddadec71b97d688202815948247da5f",
"sha256": "3214bd6db53257a7d75d220759e516f2ced543a4a71bed89b6f650b3cc37228a"
},
"downloads": -1,
"filename": "s3_reader-0.3.8.tar.gz",
"has_sig": false,
"md5_digest": "3ddadec71b97d688202815948247da5f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 70414,
"upload_time": "2025-01-29T06:34:13",
"upload_time_iso_8601": "2025-01-29T06:34:13.436492Z",
"url": "https://files.pythonhosted.org/packages/6d/04/67366d9f2a42b6c4b87854724417f6274ff5fb6422df1cec55fbcccfbb26/s3_reader-0.3.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-29 06:34:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "rcmdnk",
"github_project": "s3-reader",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "s3-reader"
}