Skip to main content

A helper library to transport your data into the (next)cloud

Project description

nephelai logo

nephelai

Actions Status Documentation Status Stable python versions Code style: black

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:

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:

nephelai upload mytestfile.txt anextcloud/path/thatwillbecreatedifneeded/
nephelai download anextcloud/path/thatwillbecreatedifneeded/mytestfile.txt

You can also upload folders including the file structure:

tests/resources
├── mymatrix.npy
└── subfolder
    └── testfile.txt

Using the upload-with-fs command:

nephelai upload-with-fs tests/resources

Which is just syntactic sugar for:

nephelai upload tests/resources tests/resources

Downloading can be done accordingly:

nephelai download tests

Which will download it to your current directory. You can also specify the download path:

nephelai download tests --local-path /tmp/

This download the folder as:

/tmp/tests
└── resources
    ├── mymatrix.npy
    └── subfolder
        └── testfile.txt

Using

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:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nephelai-0.2.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

nephelai-0.2.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file nephelai-0.2.0.tar.gz.

File metadata

  • Download URL: nephelai-0.2.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.10.6 Linux/5.19.0-38-generic

File hashes

Hashes for nephelai-0.2.0.tar.gz
Algorithm Hash digest
SHA256 16dcc34765a67359a48bcfcf29f9c28798fbdc609d3df0be81bf613ac5a700db
MD5 9875419892979796bf3dbf6b6a592287
BLAKE2b-256 87a808e01cd4fae02d6a510d3031a8d013a75157d703fd5b2ad8145c32e6a128

See more details on using hashes here.

File details

Details for the file nephelai-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: nephelai-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.10.6 Linux/5.19.0-38-generic

File hashes

Hashes for nephelai-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33d3e8d226227d26ebeba291d261b69bcc40d6279dc49e88b00cb0487e867215
MD5 57d277baefca64e1fc9408a9947eef12
BLAKE2b-256 d4ed7502b5c7003d02c15b23ec6cf58d1df1016443efc768ddb638c2fa3b87b0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page