mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Add tuf/api/exceptions.py for exceptions in the new code. I copied the exceptions from tuf/exceptions.py with a few important decisions: 1. I only added the exceptions that are used in the new code 2. I removed the general "Error" class as we can directly inherit Exceptions 3. I tried grouping the exceptions by relevance 4. I removed the second argument "UnsignedMetadataError" as it's only kept for backward compatibility and is not used 5. I tried following the new code style guidelines and linted the file with our linters. Signed-off-by: Martin Vrachev <mvrachev@vmware.com> |
||
|---|---|---|
| .. | ||
| 1.root.json | ||
| client_example.py | ||
| README.md | ||
TUF Client Example
TUF Client Example, using python-tuf.
This TUF Client Example implements the following actions:
- Client Infrastructure Initialization
- Download target files from TUF Repository
The example client expects to find a TUF repository running on localhost. We
can use the static metadata files in tests/repository_data/repository
to set one up.
Run the repository using the Python3 built-in HTTP module, and keep this session running.
$ python3 -m http.server -d tests/repository_data/repository
Serving HTTP on :: port 8000 (http://[::]:8000/) ...
How to use the TUF Client Example to download a target file.
$ ./client_example.py download file1.txt