Name | s3-reader JSON |
Version |
0.3.9
JSON |
| download |
home_page | None |
Summary | Python library to read S3 file as local file. |
upload_time | 2025-08-08 07:07:26 |
maintainer | None |
docs_url | None |
author | rcmdnk |
requires_python | >=3.9 |
license | None |
keywords |
aws
s3
file
read
|
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, s3, file, read",
"author": "rcmdnk",
"author_email": "rcmdnk <rcmdnk@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/3d/f7/9a75153527c6ee8c01f23bd209702a598ae68b1e9d738fba74d9ac01244f/s3_reader-0.3.9.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.9",
"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",
" s3",
" file",
" read"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "38fae42da03cb98acac93ef10b80858b5cbe507feaadc60d34d261989e72c507",
"md5": "c8fa06654ce0a56ae865a4c930405fee",
"sha256": "beab7743fd4262498f7950a9da8544bd75bb907a5cb52c1bc75e5209934c163a"
},
"downloads": -1,
"filename": "s3_reader-0.3.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c8fa06654ce0a56ae865a4c930405fee",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 4250,
"upload_time": "2025-08-08T07:07:24",
"upload_time_iso_8601": "2025-08-08T07:07:24.895545Z",
"url": "https://files.pythonhosted.org/packages/38/fa/e42da03cb98acac93ef10b80858b5cbe507feaadc60d34d261989e72c507/s3_reader-0.3.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3df79a75153527c6ee8c01f23bd209702a598ae68b1e9d738fba74d9ac01244f",
"md5": "8e71506ef737a2a2bab1e7013032d746",
"sha256": "876bf4293b893ed0695f9123230b521761d8fcbb491ea01ba4af9dbceb23f0a8"
},
"downloads": -1,
"filename": "s3_reader-0.3.9.tar.gz",
"has_sig": false,
"md5_digest": "8e71506ef737a2a2bab1e7013032d746",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 4417,
"upload_time": "2025-08-08T07:07:26",
"upload_time_iso_8601": "2025-08-08T07:07:26.289387Z",
"url": "https://files.pythonhosted.org/packages/3d/f7/9a75153527c6ee8c01f23bd209702a598ae68b1e9d738fba74d9ac01244f/s3_reader-0.3.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-08 07:07:26",
"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"
}