Skip to main content

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) + .env fallback, login check
  • 👥 Profiles for multiple clouds / accounts
  • Requires Python ≥ 3.11 • GPLv3

Table of Contents

  1. Installation
  2. First Login
  3. Upload Files
  4. Options & Examples
  5. Profiles
  6. Development & Tests
  7. Roadmap
  8. 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/dav if 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


Download files

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

Source Distribution

nchunk-0.4.3.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nchunk-0.4.3-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file nchunk-0.4.3.tar.gz.

File metadata

  • Download URL: nchunk-0.4.3.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

Hashes for nchunk-0.4.3.tar.gz
Algorithm Hash digest
SHA256 c97c03dabfa617cdfb6013b60c000f6b76fb3b6a176264c4564b428c416a2dca
MD5 4dc4020781a0e2e07a2ff3c64389044a
BLAKE2b-256 67daf5bfb6affd77a3a933609be7bb562dcd15e44403ea92e4a40721483f9ffa

See more details on using hashes here.

Provenance

The following attestation bundles were made for nchunk-0.4.3.tar.gz:

Publisher: release.yml on Knyllahsyhn/NChunk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nchunk-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: nchunk-0.4.3-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

Hashes for nchunk-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f9277e58b040c02cbc797387cacecaddec0d0dbaa1977c056a70afb83dc0ccba
MD5 323042b81dcadb3f04b4745821c926b5
BLAKE2b-256 14bbe7c7d63bf00f980a4e8129b120c488c716bfaa8287bcfa0614c93a200474

See more details on using hashes here.

Provenance

The following attestation bundles were made for nchunk-0.4.3-py3-none-any.whl:

Publisher: release.yml on Knyllahsyhn/NChunk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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