theupdateframework / theupdateframework/python-tuf

ngclient: feature request "download target as bytes"

Open
#1,556 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement ngclient
Dominant language
Python
Stars
1.7k
Forks
304
Avg merge
1d 2h
Merged PRs (30d)
17

Description

From #1317: When client downloads files it does not always need them written into an actual file, often it just wants the content: providing API the returns just bytes would be fine. We should still cache the target to disk but client could avoid reading the file if we provided variants of download_target() and find_cached_target() that returned bytes.

the only complication here might be that we really might want to provide an iterator[bytes] (because there could be a lot of bytes)... If that is possible that would be cool but that might be more complicated

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the ngclient implementations of download_target() and find_cached_target(). Review how they cache targets to disk and determine whether byte-returning variants or an iterator are appropriate; done means clients can obtain content without separately reading the cached file while existing caching behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.