Metadata-Version: 2.4
Name: mfup-core
Version: 0.2.0
Summary: MFUP/2 resumable multi-file upload engine: protocol codec, session state machine, SQLite staging, Redis expiry index, publish/mapping. Framework-free core.
Project-URL: Homepage, https://github.com/n0isy/mfup
Project-URL: Repository, https://github.com/n0isy/mfup
Project-URL: Issues, https://github.com/n0isy/mfup/issues
Author: n0isy
License-Expression: MIT
License-File: LICENSE
Keywords: mfup,multi-file,protocol,resumable,upload
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: crc32c>=2.7
Requires-Dist: redis>=5.0.0
Description-Content-Type: text/markdown

# mfup-core

The MFUP/2 resumable multi-file upload **engine** — framework-free.

MFUP/2 moves whole directory trees (think `node_modules`-scale: tens of
thousands of small files) from a browser to a server over one WebSocket
control channel (JSON) plus HTTP data legs (binary frames), with:

- **resume** across page reloads, network drops and server restarts
  (per-session SQLite journal in a staging directory, epoch/leg fencing);
- **interactive transfers** — the server can ASK the user mid-flight
  (overwrite? cancel?) without stopping the stream;
- **integrity** — CRC-32C per chunk (C-accelerated, hard dependency),
  commit invariants that catch lost metadata;
- **atomic publish** — staged files move into the target directory with
  `rename()`, optionally re-laid-out per file by a consumer hook;
- **retention** — Redis expiry index plus a filesystem reconciliation
  safety net; failed/cancelled sessions leave no garbage.

This package contains the protocol codec, the session state machine,
storage/publish, the Redis index, and the consumer hook contracts
(`AuthRequest/AuthResult`, `FileMapRequest`, `CommitEvent`). It does **not**
speak HTTP: pair it with [`mfup-fastapi`](https://pypi.org/project/mfup-fastapi/)
(or write your own transport shell against these primitives).

The browser side lives on npm: `@mfup/client` (TypeScript SDK) and
`@mfup/react` (hooks).

Docs and source: <https://github.com/n0isy/mfup> — see `docs/EXTENDING.md`
for the integration contract and `docs/FULL.md` for the protocol.
