Skip to content

Commit 942afa0

Browse files
author
Jussi Kukkonen
committed
ngclient: Add new client code
This is a new client library implementation using the Metadata API (the only "old" file used is exceptions.py) * Functional but largely still untested * Requires work before it can replace tuf.client but should be good enough to include in the repo The major changes compared to current client so far are: * Use of Metadata API * Major simplification in the way downloads are handled due to removing mirrors support * Separating tracking of valid metadata into a separate component * There's no MultiRepoUpdater We do not expect other major changes (in the sense of moving large amounts of code) but do plan to possibly improve the client API. The API has already changed so this is not going to be a 1:1 compatible implementation, but porting should not be difficult. Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
1 parent fe83767 commit 942afa0

5 files changed

Lines changed: 1063 additions & 0 deletions

File tree

tuf/ngclient/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Next-gen TUF client for Python
2+
3+
This package provides modules for TUF client implementers.
4+
5+
**tuf.ngclient.Updater** is a class that implements the client workflow
6+
described in the TUF specification (see
7+
https://theupdateframework.github.io/specification/latest/#detailed-client-workflow)
8+
9+
**tuf.ngclient.FetcherInterface** is an abstract class that client
10+
implementers can optionally use to integrate with their own
11+
network/download infrastructure -- a Requests-based implementation is
12+
used by default.
13+
14+
This package:
15+
* Aims to be a clean, easy-to-validate reference client implementation
16+
written in modern Python
17+
* At the same time aims to be the library choice for anyone
18+
implementing a TUF client in Python: light-weight, easy to integrate
19+
and with minimal required dependencies
20+
* Is still under development but planned to become the default client
21+
in this code base (as in the older tuf.client will be deprecated in
22+
the future)

tuf/ngclient/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright New York University and the TUF contributors
2+
# SPDX-License-Identifier: MIT OR Apache-2.0
3+
4+
"""TUF client public API
5+
"""
6+
7+
from tuf.ngclient.fetcher import FetcherInterface
8+
from tuf.ngclient.updater import Updater

tuf/ngclient/_internal/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)