Name | CathD JSON |
Version |
0.0.2
JSON |
| download |
home_page | None |
Summary | Library used to download files and support sending to S3 |
upload_time | 2024-09-24 14:22:12 |
maintainer | None |
docs_url | None |
author | ryyos (Rio Dwi Saputra) |
requires_python | None |
license | None |
keywords |
download
s3
s3fs
log
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# CathD
![Version](https://img.shields.io/badge/version-0.0.2-green.svg?cacheSeconds=2592000)
![ProjectImage](https://raw.githubusercontent.com/ryyos/ryyos/refs/heads/main/images/erine/kawaiii.jpeg)
---
## Features β¨
- **Download Log**: The download feature is accompanied by a log for connection speed and remaining time required.
- **send to s3**: accompanied by a feature to directly send downloaded files to S3 with the s3fs library.
- **easy use**: Simple calls and easy S3FS configuration.
## Requirement βοΈ
- [Python](https://www.python.org/) v3.11.6+
- [s3fs](https://pypi.org/project/s3fs/) v2024.9.0+
- [loguru](https://pypi.org/project/loguru/) v0.7.2+
## Installation π οΈ
```sh
pip install cathd
```
## How To Usage π€
#### 1. Basic use
If you only want to use the download feature and save it locally on your laptop
```python
from cathd import CathD
url = 'https://raw.githubusercontent.com/ryyos/ryyos/refs/heads/main/images/erine/kawaiii.jpeg'
path = 'data/erine_kawai.jpg'
CathD.download(
url=url,
path=path,
save=True,
)
```
#### 2. Send to S3 with an external S3FS connection
If you want to send the downloaded file to S3 and you want to use an external S3FS connection, you can enter your S3FS connection into the "s3fs_connection" param.
```python
import s3fs
from cathd import CathD
url = 'https://raw.githubusercontent.com/ryyos/ryyos/refs/heads/main/images/erine/kawaiii.jpeg'
path = 'data/erine_kawai.jpg'
client_kwargs = {
"key": "aws_access_key_id",
"secret": "aws_secret_access_key",
"endpoint_url": "endpoint_url",
}
s3 = s3fs.core.S3FileSystem(**client_kwargs)
CathD.download(
url=url,
path=path,
save=True,
send_s3=True,
s3fs_connection=s3
)
```
#### 3. Send to S3 with an internal S3FS connection
If you want to send the downloaded file to the S3 with an internal connection or use the function from CathD to establish a connection to the S3, you can also do it like this
```python
from cathd import CathD
url = 'https://raw.githubusercontent.com/ryyos/ryyos/refs/heads/main/images/erine/kawaiii.jpeg'
path = 'data/erine_kawai.jpg'
CathD.build_s3fs(
access_key_id="aws_access_key_id",
secret_access_key="aws_secret_access_key",
endpoint_url="endpoint_url",
bucket="bucket"
)
CathD.download(
url=url,
path=path,
save=True,
send_s3=True,
)
```
## πStructure
```
βββ cathd
βΒ Β βββ CathD.py
βΒ Β βββ __init__.py
βΒ Β βββ utils.py
βββ LICENSE
βββ README.md
βββ setup.py
```
## Author
π€ **Rio Dwi Saputra**
- Twitter: [@ryyo_cs](https://twitter.com/ryyo_cs)
- Github: [@ryyos](https://github.com/ryyos)
- Instagram: [@ryyo.cs](https://www.instagram.com/ryyo.cs/)
- LinkedIn: [@rio-dwi-saputra-23560b287](https://www.linkedin.com/in/rio-dwi-saputra-23560b287/)
<a href="https://www.linkedin.com/in/rio-dwi-saputra-23560b287/">
<img align="left" alt="Ryo's LinkedIn" width="24px" src="https://cdn.jsdelivr.net/npm/simple-icons@v3/icons/linkedin.svg" />
</a>
<a href="https://www.instagram.com/ryyo.cs/">
<img align="left" alt="Ryo's Instagram" width="24px" src="https://cdn.jsdelivr.net/npm/simple-icons@v3/icons/instagram.svg" />
</a>
Raw data
{
"_id": null,
"home_page": null,
"name": "CathD",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "download, s3, s3fs, log",
"author": "ryyos (Rio Dwi Saputra)",
"author_email": "<riodwi12174@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/00/5e/50fcee7ebf1b1e27b186def838717453b57cd19d831b3bd8fcaa56821566/CathD-0.0.2.tar.gz",
"platform": null,
"description": "\n# CathD\n\n![Version](https://img.shields.io/badge/version-0.0.2-green.svg?cacheSeconds=2592000)\n![ProjectImage](https://raw.githubusercontent.com/ryyos/ryyos/refs/heads/main/images/erine/kawaiii.jpeg)\n\n---\n\n## Features \u2728\n\n- **Download Log**: The download feature is accompanied by a log for connection speed and remaining time required.\n- **send to s3**: accompanied by a feature to directly send downloaded files to S3 with the s3fs library.\n- **easy use**: Simple calls and easy S3FS configuration.\n\n## Requirement \u2699\ufe0f\n\n- [Python](https://www.python.org/) v3.11.6+\n- [s3fs](https://pypi.org/project/s3fs/) v2024.9.0+\n- [loguru](https://pypi.org/project/loguru/) v0.7.2+\n\n## Installation \ud83d\udee0\ufe0f\n\n```sh\npip install cathd\n```\n\n## How To Usage \ud83e\udd14\n\n#### 1. Basic use\n\n If you only want to use the download feature and save it locally on your laptop\n\n```python\nfrom cathd import CathD\n\nurl = 'https://raw.githubusercontent.com/ryyos/ryyos/refs/heads/main/images/erine/kawaiii.jpeg'\npath = 'data/erine_kawai.jpg'\n\nCathD.download(\n url=url,\n path=path,\n save=True,\n)\n```\n\n#### 2. Send to S3 with an external S3FS connection\n\n If you want to send the downloaded file to S3 and you want to use an external S3FS connection, you can enter your S3FS connection into the \"s3fs_connection\" param.\n\n```python\nimport s3fs\n\nfrom cathd import CathD\n\nurl = 'https://raw.githubusercontent.com/ryyos/ryyos/refs/heads/main/images/erine/kawaiii.jpeg'\npath = 'data/erine_kawai.jpg'\n\nclient_kwargs = {\n \"key\": \"aws_access_key_id\",\n \"secret\": \"aws_secret_access_key\",\n \"endpoint_url\": \"endpoint_url\",\n}\n\ns3 = s3fs.core.S3FileSystem(**client_kwargs)\n\nCathD.download(\n url=url,\n path=path,\n save=True,\n send_s3=True,\n s3fs_connection=s3\n)\n\n```\n\n#### 3. Send to S3 with an internal S3FS connection\n\n If you want to send the downloaded file to the S3 with an internal connection or use the function from CathD to establish a connection to the S3, you can also do it like this\n\n```python\n\nfrom cathd import CathD\n\nurl = 'https://raw.githubusercontent.com/ryyos/ryyos/refs/heads/main/images/erine/kawaiii.jpeg'\npath = 'data/erine_kawai.jpg'\n\nCathD.build_s3fs(\n access_key_id=\"aws_access_key_id\",\n secret_access_key=\"aws_secret_access_key\",\n endpoint_url=\"endpoint_url\",\n bucket=\"bucket\"\n)\n\nCathD.download(\n url=url,\n path=path,\n save=True,\n send_s3=True,\n)\n\n```\n\n## \ud83d\ude80Structure\n\n```\n\u251c\u2500\u2500 cathd\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 CathD.py\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 __init__.py\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 utils.py\n\u251c\u2500\u2500 LICENSE\n\u251c\u2500\u2500 README.md\n\u2514\u2500\u2500 setup.py\n```\n\n## Author\n\n\ud83d\udc64 **Rio Dwi Saputra**\n\n- Twitter: [@ryyo_cs](https://twitter.com/ryyo_cs)\n- Github: [@ryyos](https://github.com/ryyos)\n- Instagram: [@ryyo.cs](https://www.instagram.com/ryyo.cs/)\n- LinkedIn: [@rio-dwi-saputra-23560b287](https://www.linkedin.com/in/rio-dwi-saputra-23560b287/)\n\n<a href=\"https://www.linkedin.com/in/rio-dwi-saputra-23560b287/\">\n <img align=\"left\" alt=\"Ryo's LinkedIn\" width=\"24px\" src=\"https://cdn.jsdelivr.net/npm/simple-icons@v3/icons/linkedin.svg\" />\n</a>\n<a href=\"https://www.instagram.com/ryyo.cs/\">\n <img align=\"left\" alt=\"Ryo's Instagram\" width=\"24px\" src=\"https://cdn.jsdelivr.net/npm/simple-icons@v3/icons/instagram.svg\" />\n</a>\n",
"bugtrack_url": null,
"license": null,
"summary": "Library used to download files and support sending to S3",
"version": "0.0.2",
"project_urls": null,
"split_keywords": [
"download",
" s3",
" s3fs",
" log"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c6b6b43aed5fd630c5f9c5ddb922cffa935374a13bdff76a097ab895a142b555",
"md5": "338ba48da3fc7c3d3295bbc72d57ca7e",
"sha256": "55cdc399a54b7526a3f01ec100f48f21662d5b5e2128815f227e2b7854fd2f7a"
},
"downloads": -1,
"filename": "CathD-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "338ba48da3fc7c3d3295bbc72d57ca7e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 8678,
"upload_time": "2024-09-24T14:22:11",
"upload_time_iso_8601": "2024-09-24T14:22:11.132853Z",
"url": "https://files.pythonhosted.org/packages/c6/b6/b43aed5fd630c5f9c5ddb922cffa935374a13bdff76a097ab895a142b555/CathD-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "005e50fcee7ebf1b1e27b186def838717453b57cd19d831b3bd8fcaa56821566",
"md5": "92465724aced372587a730a4755915be",
"sha256": "934022326e4ab5e9ab23235ae54b76ac5d07423faecca9ee068d27d04b84cd51"
},
"downloads": -1,
"filename": "CathD-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "92465724aced372587a730a4755915be",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8299,
"upload_time": "2024-09-24T14:22:12",
"upload_time_iso_8601": "2024-09-24T14:22:12.975346Z",
"url": "https://files.pythonhosted.org/packages/00/5e/50fcee7ebf1b1e27b186def838717453b57cd19d831b3bd8fcaa56821566/CathD-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-24 14:22:12",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "cathd"
}