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.2.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.2-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

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

Hashes for nchunk-0.4.2.tar.gz
Algorithm Hash digest
SHA256 6090e8f5475699aaf252a079a7d0a69941ae6d1b29d50282ed34d1287448e2f5
MD5 3ecdd4ca3fb2309cb2d5496fea73e27b
BLAKE2b-256 dd88122db8d2538c168ac5385e37e4331511099a058d3152d55c0c4c6eae4227

See more details on using hashes here.

Provenance

The following attestation bundles were made for nchunk-0.4.2.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.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

Hashes for nchunk-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3f32442aea40eb0e06ac3b310c4989ea965fc97ea5bd7bbf9c1bcaab56df29ed
MD5 c40d85bd3389916594bc0e97d799fe09
BLAKE2b-256 f4bde2a35eb1f2804878a66779e0ca22a5a0b70ebdd30277801a155c19dcf093

See more details on using hashes here.

Provenance

The following attestation bundles were made for nchunk-0.4.2-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