nephelai


Namenephelai JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/dobraczka/nephelai
SummaryA helper library to transport your data into the (next)cloud
upload_time2023-09-13 15:35:07
maintainer
docs_urlNone
authorDaniel Obraczka
requires_python>=3.8,<4.0
licenseMIT
keywords nextcloud mlops
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
<img src="https://github.com/dobraczka/nephelai/raw/main/docs/assets/logo.png" alt="nephelai logo", width=200/>
<h2 align="center">nephelai</h2>
</p>

<p align="center">
<a href="https://github.com/dobraczka/nephelai/actions/workflows/main.yml"><img alt="Actions Status" src="https://github.com/dobraczka/nephelai/actions/workflows/main.yml/badge.svg?branch=main"></a>
<a href='https://nephelai.readthedocs.io/en/latest/?badge=latest'><img src='https://readthedocs.org/projects/nephelai/badge/?version=latest' alt='Documentation Status' /></a>
<a href="https://pypi.org/project/nephelai"/><img alt="Stable python versions" src="https://img.shields.io/pypi/pyversions/nephelai"></a>
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
</p>

A helper library to upload/download files to/from a password-protected shared nextcloud folder. The link and password are read from your `.env` to enable project-specific shared folders.
Because Nextcloud does not enable chunked uploads for shared folders and your files can hit the size limit, your files are uploaded in chunks if needed and reconstructed after download.

Usage
=====
Create a `.env` file in your project root.
Remember to add this file to your `.gitignore` and always keep it secure to keep your secrets!
Your `.env` should contain:
```bash
NEXTCLOUD_FOLDER_URI="uri_of_the_shared_folder"
NEXTCLOUD_FOLDER_PW="pw_of_the_folder"
```
Then you can interact with the folder in a variety of ways.
Alternatively, you can set this environment variables yourself with your preferred method.

Via CLI:
--------
```bash
nephelai upload mytestfile.txt anextcloud/path/thatwillbecreatedifneeded/
nephelai download anextcloud/path/thatwillbecreatedifneeded/mytestfile.txt
```
You can also upload folders including the file structure:
```bash
tests/resources
├── mymatrix.npy
└── subfolder
    └── testfile.txt
```
Using the `upload-with-fs` command:
```bash
nephelai upload-with-fs tests/resources
```

Which is just syntactic sugar for:

```bash
nephelai upload tests/resources tests/resources
```

Downloading can be done accordingly:
```bash
nephelai download tests
```
Which will download it to your current directory. You can also specify the download path:

```bash
nephelai download tests --local-path /tmp/
```
This download the folder as:
```bash
/tmp/tests
└── resources
    ├── mymatrix.npy
    └── subfolder
        └── testfile.txt
```

Using 

```bash
nephelai ls tests
```
you can show the files in the `tests` directory.

You can get help for each command via the `--help` flag.

Via Python:
----------
```python
from nephelai import upload, download

upload("tests/resources", "tests/resources")
file_dl_path = "/tmp/mymatrix.npy"
download("tests/resources/mymatrix.npy",file_dl_path)

import numpy as np

mymatrix = np.load(file_dl_path)
```

Installation
============

`pip install nephelai`

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dobraczka/nephelai",
    "name": "nephelai",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "nextcloud,mlops",
    "author": "Daniel Obraczka",
    "author_email": "obraczka@informatik.uni-leipzig.de",
    "download_url": "https://files.pythonhosted.org/packages/87/a8/08e01cd4fae02d6a510d3031a8d013a75157d703fd5b2ad8145c32e6a128/nephelai-0.2.0.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n<img src=\"https://github.com/dobraczka/nephelai/raw/main/docs/assets/logo.png\" alt=\"nephelai logo\", width=200/>\n<h2 align=\"center\">nephelai</h2>\n</p>\n\n<p align=\"center\">\n<a href=\"https://github.com/dobraczka/nephelai/actions/workflows/main.yml\"><img alt=\"Actions Status\" src=\"https://github.com/dobraczka/nephelai/actions/workflows/main.yml/badge.svg?branch=main\"></a>\n<a href='https://nephelai.readthedocs.io/en/latest/?badge=latest'><img src='https://readthedocs.org/projects/nephelai/badge/?version=latest' alt='Documentation Status' /></a>\n<a href=\"https://pypi.org/project/nephelai\"/><img alt=\"Stable python versions\" src=\"https://img.shields.io/pypi/pyversions/nephelai\"></a>\n<a href=\"https://github.com/psf/black\"><img alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"></a>\n</p>\n\nA helper library to upload/download files to/from a password-protected shared nextcloud folder. The link and password are read from your `.env` to enable project-specific shared folders.\nBecause Nextcloud does not enable chunked uploads for shared folders and your files can hit the size limit, your files are uploaded in chunks if needed and reconstructed after download.\n\nUsage\n=====\nCreate a `.env` file in your project root.\nRemember to add this file to your `.gitignore` and always keep it secure to keep your secrets!\nYour `.env` should contain:\n```bash\nNEXTCLOUD_FOLDER_URI=\"uri_of_the_shared_folder\"\nNEXTCLOUD_FOLDER_PW=\"pw_of_the_folder\"\n```\nThen you can interact with the folder in a variety of ways.\nAlternatively, you can set this environment variables yourself with your preferred method.\n\nVia CLI:\n--------\n```bash\nnephelai upload mytestfile.txt anextcloud/path/thatwillbecreatedifneeded/\nnephelai download anextcloud/path/thatwillbecreatedifneeded/mytestfile.txt\n```\nYou can also upload folders including the file structure:\n```bash\ntests/resources\n\u251c\u2500\u2500 mymatrix.npy\n\u2514\u2500\u2500 subfolder\n    \u2514\u2500\u2500 testfile.txt\n```\nUsing the `upload-with-fs` command:\n```bash\nnephelai upload-with-fs tests/resources\n```\n\nWhich is just syntactic sugar for:\n\n```bash\nnephelai upload tests/resources tests/resources\n```\n\nDownloading can be done accordingly:\n```bash\nnephelai download tests\n```\nWhich will download it to your current directory. You can also specify the download path:\n\n```bash\nnephelai download tests --local-path /tmp/\n```\nThis download the folder as:\n```bash\n/tmp/tests\n\u2514\u2500\u2500 resources\n    \u251c\u2500\u2500 mymatrix.npy\n    \u2514\u2500\u2500 subfolder\n        \u2514\u2500\u2500 testfile.txt\n```\n\nUsing \n\n```bash\nnephelai ls tests\n```\nyou can show the files in the `tests` directory.\n\nYou can get help for each command via the `--help` flag.\n\nVia Python:\n----------\n```python\nfrom nephelai import upload, download\n\nupload(\"tests/resources\", \"tests/resources\")\nfile_dl_path = \"/tmp/mymatrix.npy\"\ndownload(\"tests/resources/mymatrix.npy\",file_dl_path)\n\nimport numpy as np\n\nmymatrix = np.load(file_dl_path)\n```\n\nInstallation\n============\n\n`pip install nephelai`\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A helper library to transport your data into the (next)cloud",
    "version": "0.2.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/dobraczka/nephelai/issues",
        "Documentation": "https://nephelai.readthedocs.io",
        "Homepage": "https://github.com/dobraczka/nephelai",
        "Repository": "https://github.com/dobraczka/nephelai",
        "Source": "https://github.com/dobraczka/nephelai"
    },
    "split_keywords": [
        "nextcloud",
        "mlops"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d4ed7502b5c7003d02c15b23ec6cf58d1df1016443efc768ddb638c2fa3b87b0",
                "md5": "57d277baefca64e1fc9408a9947eef12",
                "sha256": "33d3e8d226227d26ebeba291d261b69bcc40d6279dc49e88b00cb0487e867215"
            },
            "downloads": -1,
            "filename": "nephelai-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "57d277baefca64e1fc9408a9947eef12",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 7917,
            "upload_time": "2023-09-13T15:35:05",
            "upload_time_iso_8601": "2023-09-13T15:35:05.573336Z",
            "url": "https://files.pythonhosted.org/packages/d4/ed/7502b5c7003d02c15b23ec6cf58d1df1016443efc768ddb638c2fa3b87b0/nephelai-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "87a808e01cd4fae02d6a510d3031a8d013a75157d703fd5b2ad8145c32e6a128",
                "md5": "9875419892979796bf3dbf6b6a592287",
                "sha256": "16dcc34765a67359a48bcfcf29f9c28798fbdc609d3df0be81bf613ac5a700db"
            },
            "downloads": -1,
            "filename": "nephelai-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9875419892979796bf3dbf6b6a592287",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 8480,
            "upload_time": "2023-09-13T15:35:07",
            "upload_time_iso_8601": "2023-09-13T15:35:07.544672Z",
            "url": "https://files.pythonhosted.org/packages/87/a8/08e01cd4fae02d6a510d3031a8d013a75157d703fd5b2ad8145c32e6a128/nephelai-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-13 15:35:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dobraczka",
    "github_project": "nephelai",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nephelai"
}
        
Elapsed time: 0.11119s