Summary
Write a "File operations as data management" tutorial that demonstrates
the v0.3.0 dazzle_filekit.data API in realistic workflows without
ever mentioning the word "primitive".
This is the user-facing counterpart to the v0.2.4 docs/unctools-integration.md
guide, but one layer up: instead of showing how to compose primitives,
it shows how to use the seamless data.* API to do backup, mirror,
sync, and archive operations.
Target audience
Someone who:
- Knows Python but isn't a systems programmer
- Has heard "copy this file from there to here with metadata and a
hash" and wants one obvious way to do it
- Doesn't want to think about UNC vs drive letter, or whether they're
on Windows or WSL
- Wants their code to work the same on all three platforms
Structure
- Intro: the "data management" framing. A file is data with a
location, not a sequence of bytes at a particular OS path.
- Hello world:
data.copy(src, dst) with a Windows path, a Linux
path, and a UNC path. Show they all work the same.
- Rich preservation:
data.copy(src, dst, preserve="all") with
a Windows SDDL example, a Linux xattrs example, and a macOS
quarantine-skip example.
- Verification:
data.copy(src, dst, verify="sha256") and how the
hash comparison catches silent corruption.
- Manifests:
data.copy(src, dst, manifest=True) and what the
sidecar .json file looks like. Show how to restore from the
manifest later.
- Mirror a directory:
data.sync(src_dir, dst_dir, mode="mirror")
with a real example (back up ~/projects to an external drive).
- The object flavor:
doc = data.open(path); doc.copy_to(...)
as an alternative style. Show .metadata, .hash_sha256, .sibling().
- Graceful degradation: what happens if you don't install preservelib
or unctools. When do you need them? (Short answer: only for specific
features; the default behavior works without them.)
- Cross-platform: show the same tutorial code running identically
on Windows, Linux, and WSL. Mention is_wsl() as an escape hatch
for tools that need to know.
- "I'm coming from shutil": migration guide from
shutil.copy*,
shutil.move, shutil.copytree to the data.* equivalents.
Where it lives
- Primary location:
docs/data-management-tutorial.md
- README should link to it from the Quick Start section as
"For a full walkthrough, see the Data Management tutorial"
- Possibly also published as a blog post or GitHub wiki page (future)
Acceptance criteria
Dependencies
- Blocked by: #N+1 (data submodule), #N+2 (DataRef API), and
#N+4 (parse_user_input_path) -- needs the full v0.3.0 API to
exist before we can document it
Non-goals
- This is NOT the reference documentation -- that's a separate,
generated-from-docstrings artifact (see API_STABILITY.md for the
locked surface we'd auto-generate from)
- This is NOT a design document -- no "why we made this decision"
content, just "here's how to use it"
Summary
Write a "File operations as data management" tutorial that demonstrates
the v0.3.0
dazzle_filekit.dataAPI in realistic workflows withoutever mentioning the word "primitive".
This is the user-facing counterpart to the v0.2.4
docs/unctools-integration.mdguide, but one layer up: instead of showing how to compose primitives,
it shows how to use the seamless
data.*API to do backup, mirror,sync, and archive operations.
Target audience
Someone who:
hash" and wants one obvious way to do it
on Windows or WSL
Structure
location, not a sequence of bytes at a particular OS path.
data.copy(src, dst)with a Windows path, a Linuxpath, and a UNC path. Show they all work the same.
data.copy(src, dst, preserve="all")witha Windows SDDL example, a Linux xattrs example, and a macOS
quarantine-skip example.
data.copy(src, dst, verify="sha256")and how thehash comparison catches silent corruption.
data.copy(src, dst, manifest=True)and what thesidecar .json file looks like. Show how to restore from the
manifest later.
data.sync(src_dir, dst_dir, mode="mirror")with a real example (back up
~/projectsto an external drive).doc = data.open(path); doc.copy_to(...)as an alternative style. Show
.metadata,.hash_sha256,.sibling().or unctools. When do you need them? (Short answer: only for specific
features; the default behavior works without them.)
on Windows, Linux, and WSL. Mention
is_wsl()as an escape hatchfor tools that need to know.
shutil.copy*,shutil.move,shutil.copytreeto thedata.*equivalents.Where it lives
docs/data-management-tutorial.md"For a full walkthrough, see the Data Management tutorial"
Acceptance criteria
docs/data-management-tutorial.mdexistsas doctests or as snippets pulled from an actual test file
cross-platform runner script should cover it)
filekit's internal architecture -- it's user-facing only
Dependencies
#N+4 (parse_user_input_path) -- needs the full v0.3.0 API to
exist before we can document it
Non-goals
generated-from-docstrings artifact (see
API_STABILITY.mdfor thelocked surface we'd auto-generate from)
content, just "here's how to use it"