Name | s3-reader JSON |
Version |
0.3.7
JSON |
| download |
home_page | None |
Summary | Python library to read S3 file as local file. |
upload_time | 2024-11-11 14:36:15 |
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
[![test](https://github.com/rcmdnk/s3-reader/actions/workflows/test.yml/badge.svg)](https://github.com/rcmdnk/s3-reader/actions/workflows/test.yml)
[![test coverage](https://img.shields.io/badge/coverage-check%20here-blue.svg)](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/54/a3/1ad9f300e658fdfc7e6a5516d722d98247880a88cd3d3228b35f2ece28e1/s3_reader-0.3.7.tar.gz",
"platform": null,
"description": "# s3-reader\n\n[![test](https://github.com/rcmdnk/s3-reader/actions/workflows/test.yml/badge.svg)](https://github.com/rcmdnk/s3-reader/actions/workflows/test.yml)\n[![test coverage](https://img.shields.io/badge/coverage-check%20here-blue.svg)](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.7",
"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": "1cbd267f02b03a75cd194ad27545dbfed6b5259a60e091cb8dfc5616f267cd84",
"md5": "1ead4552ed49c263dc216bf167e065fd",
"sha256": "d9a9d3413b2877ec95d07c1544cb7e223b7bad871ea14d41965bd886800083e0"
},
"downloads": -1,
"filename": "s3_reader-0.3.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1ead4552ed49c263dc216bf167e065fd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 8051,
"upload_time": "2024-11-11T14:36:13",
"upload_time_iso_8601": "2024-11-11T14:36:13.378550Z",
"url": "https://files.pythonhosted.org/packages/1c/bd/267f02b03a75cd194ad27545dbfed6b5259a60e091cb8dfc5616f267cd84/s3_reader-0.3.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "54a31ad9f300e658fdfc7e6a5516d722d98247880a88cd3d3228b35f2ece28e1",
"md5": "611fddf6d6d22378c0ac095356738554",
"sha256": "b4cd5d76d500a91f93cfce543ffb9c835bea8dbdd24215df1d7c41b226a6f146"
},
"downloads": -1,
"filename": "s3_reader-0.3.7.tar.gz",
"has_sig": false,
"md5_digest": "611fddf6d6d22378c0ac095356738554",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 70423,
"upload_time": "2024-11-11T14:36:15",
"upload_time_iso_8601": "2024-11-11T14:36:15.915520Z",
"url": "https://files.pythonhosted.org/packages/54/a3/1ad9f300e658fdfc7e6a5516d722d98247880a88cd3d3228b35f2ece28e1/s3_reader-0.3.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-11 14:36:15",
"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"
}