https://github.com/dobraczka/nephelai
🌧️ A helper library to transport your data into the (next)cloud
https://github.com/dobraczka/nephelai
Last synced: 12 days ago
JSON representation
🌧️ A helper library to transport your data into the (next)cloud
- Host: GitHub
- URL: https://github.com/dobraczka/nephelai
- Owner: dobraczka
- License: mit
- Created: 2023-08-07T12:02:23.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-13T15:35:03.000Z (about 2 years ago)
- Last Synced: 2025-09-21T07:51:40.765Z (27 days ago)
- Language: Python
- Homepage:
- Size: 101 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
nephelai
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, downloadupload("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`