Asynchronous chunked uploader for Nextcloud with Typer CLI and Rich progress bars
Project description
NChunk – Async Chunked Uploader for Nextcloud
NChunk uploads huge files to Nextcloud safely—no browser, no time‑outs.
- 🏎 Fully async (
aiohttp+aiofiles) — one connection, full speed - 🔀 Chunk upload (≥ 5 MiB) with automatic merge (
MOVE …/.file) - 🖥 Typer CLI — self‑documenting, with colorized Rich output
- 📊 Live progress bars (speed, ETA, multiple files in parallel)
- 🔐 Secure credential storage (keyring) +
.envfallback, login check - 👥 Profiles for multiple clouds / accounts
- Requires Python ≥ 3.11 • GPLv3+
Table of Contents
- Installation
- First Login
- Upload Files
- Options & Examples
- Profiles
- Development & Tests
- Roadmap
- License
Installation
# recommended: src-layout + editable install
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\Activate.ps1
pip install -e .[dev] # incl. pytest + ruff
(Once on PyPI you can simply run pip install nchunk.)
First Login
# instantly verifies URL + credentials via PROPFIND
nchunk login https://cloud.example.com alice
# password is prompted securely
- On success credentials are stored in the OS keyring (
nchunk_nextcloud). - On failure you get a clear message and nothing is saved.
Upload Files
# single file
nchunk upload movie.iso \
--url https://cloud.example.com \
--user alice
# several in parallel
nchunk upload *.zip docs/**/*.pdf \
--url cloud.example.com \
--user alice \
--chunk-size 10485760 \
--remote-dir Backups/$(date +%Y-%m-%d)
You may omit
https://; the tool auto‑attaches/remote.php/davif needed.
Options & Examples
| Flag | Default | Description |
|---|---|---|
--chunk-size |
10485760 |
bytes per chunk (≥ 5 MiB) |
--remote-dir |
"" |
target folder in Nextcloud (created if absent) |
--insecure |
False |
skip TLS verification (self‑signed certs) |
--concurrency |
4 |
max concurrent file uploads |
--profile |
default |
separate multiple accounts |
--resume* |
– | planned — resume aborted upload |
--dry-run* |
– | planned — print requests, do nothing |
Profiles
# Work cloud
nchunk login https://cloud.work.com alice --profile work
# Private cloud
nchunk login cloud.home.net bob --profile home
# Use explicit profile
nchunk upload video.mp4 --profile work
Credentials are stored under <url>::<user>::<profile>.
Development & Tests
ruff check src tests # static analysis
pytest -q # unit + async tests
The src‑layout ensures imports work only after
pip install -e . — missing metadata show up immediately.
Roadmap
- Resume aborted uploads (
--resume) - Folder sync (watch & upload)
- Progress export as JSON / quiet mode
- Signed wheels + PyPI release
- Windows single‑binary (pex / shiv)
PRs & issues welcome 🙂
License
GPLv3+
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nchunk-0.4.2.tar.gz.
File metadata
- Download URL: nchunk-0.4.2.tar.gz
- Upload date:
- Size: 20.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6090e8f5475699aaf252a079a7d0a69941ae6d1b29d50282ed34d1287448e2f5
|
|
| MD5 |
3ecdd4ca3fb2309cb2d5496fea73e27b
|
|
| BLAKE2b-256 |
dd88122db8d2538c168ac5385e37e4331511099a058d3152d55c0c4c6eae4227
|
Provenance
The following attestation bundles were made for nchunk-0.4.2.tar.gz:
Publisher:
release.yml on Knyllahsyhn/NChunk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nchunk-0.4.2.tar.gz -
Subject digest:
6090e8f5475699aaf252a079a7d0a69941ae6d1b29d50282ed34d1287448e2f5 - Sigstore transparency entry: 223218865
- Sigstore integration time:
-
Permalink:
Knyllahsyhn/NChunk@62f54ce59b88326ced1dde85a3459ae0406d513c -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/Knyllahsyhn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@62f54ce59b88326ced1dde85a3459ae0406d513c -
Trigger Event:
push
-
Statement type:
File details
Details for the file nchunk-0.4.2-py3-none-any.whl.
File metadata
- Download URL: nchunk-0.4.2-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f32442aea40eb0e06ac3b310c4989ea965fc97ea5bd7bbf9c1bcaab56df29ed
|
|
| MD5 |
c40d85bd3389916594bc0e97d799fe09
|
|
| BLAKE2b-256 |
f4bde2a35eb1f2804878a66779e0ca22a5a0b70ebdd30277801a155c19dcf093
|
Provenance
The following attestation bundles were made for nchunk-0.4.2-py3-none-any.whl:
Publisher:
release.yml on Knyllahsyhn/NChunk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nchunk-0.4.2-py3-none-any.whl -
Subject digest:
3f32442aea40eb0e06ac3b310c4989ea965fc97ea5bd7bbf9c1bcaab56df29ed - Sigstore transparency entry: 223218877
- Sigstore integration time:
-
Permalink:
Knyllahsyhn/NChunk@62f54ce59b88326ced1dde85a3459ae0406d513c -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/Knyllahsyhn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@62f54ce59b88326ced1dde85a3459ae0406d513c -
Trigger Event:
push
-
Statement type: