Skip to content

Commit 8b5778b

Browse files
committed
Move release notes to separate file and xref Rust supported formats
1 parent 7ee651d commit 8b5778b

File tree

2 files changed

+68
-75
lines changed

2 files changed

+68
-75
lines changed

README.md

Lines changed: 16 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
# C2PA Python
22

3-
This repository implements Python bindings for the Content Authenticity Initiative (CAI) library.
3+
This package implements Python bindings for the Content Authenticity Initiative (CAI) SDK.
4+
It enables you to read and validate C2PA manifest data from and add signed manifests to media files in the [supported formats](https://github.com/contentauth/c2pa-rs/blob/main/docs/supported-formats.md).
45

5-
This library enables you to read and validate C2PA data in supported media files and add signed manifests to supported media files.
6-
7-
**NOTE**: Starting with version 0.5.0, this package has a completely different API from version 0.4.0. See [Release notes](#release-notes) for more information.
6+
**NOTE**: Starting with version 0.5.0, this package has a completely different API from version 0.4.0. See [Release notes](docs/release-notes.md) for more information.
87

98
**WARNING**: This is an prerelease version of this library. There may be bugs and unimplemented features, and the API is subject to change.
109

10+
<div style={{display: 'none'}}>
11+
12+
For information on what's in the current release, see the [Release notes](docs/release-notes.md).
13+
14+
</div>
15+
1116
## Installation
1217

1318
Install from PyPI by entering this command:
@@ -36,8 +41,14 @@ If you tried unsuccessfully to install this package before the [0.40 release](ht
3641
pip install --upgrade --force-reinstall c2pa-python
3742
```
3843

44+
## Supported formats
45+
46+
The Python library [supports the same media file formats](https://github.com/contentauth/c2pa-rs/blob/main/docs/supported-formats.md) as the Rust library.
47+
3948
## Usage
4049

50+
This package works with media files in the [supported formats](https://github.com/contentauth/c2pa-rs/blob/main/docs/supported-formats.md).
51+
4152
### Import
4253

4354
Import the API as follows:
@@ -100,7 +111,7 @@ def sign_ps256(data: bytes, key_path: str) -> bytes:
100111

101112
**Read and validate C2PA data from an asset file**
102113

103-
Use the `Reader` to read C2PA data from the specified asset file (see [supported file formats](#supported-file-formats)).
114+
Use the `Reader` to read C2PA data from the specified asset file.
104115

105116
This examines the specified media file for C2PA data and generates a report of any data it finds. If there are validation errors, the report includes a `validation_status` field.
106117

@@ -270,29 +281,6 @@ except Exception as err:
270281
print(err)
271282
```
272283

273-
## Supported file formats
274-
275-
| Extensions | MIME type |
276-
| ------------- | --------------------------------------------------- |
277-
| `avi` | `video/msvideo`, `video/avi`, `application-msvideo` |
278-
| `avif` | `image/avif` |
279-
| `c2pa` | `application/x-c2pa-manifest-store` |
280-
| `dng` | `image/x-adobe-dng` |
281-
| `gif` | `image/gif` |
282-
| `heic` | `image/heic` |
283-
| `heif` | `image/heif` |
284-
| `jpg`, `jpeg` | `image/jpeg` |
285-
| `m4a` | `audio/mp4` |
286-
| `mp3` | `audio/mpeg` |
287-
| `mp4` | `video/mp4`, `application/mp4` |
288-
| `mov` | `video/quicktime` |
289-
| `png` | `image/png` |
290-
| `svg` | `image/svg+xml` |
291-
| `tif`,`tiff` | `image/tiff` |
292-
| `wav` | `audio/x-wav` |
293-
| `webp` | `image/webp` |
294-
295-
296284
## Development
297285

298286
It is best to [set up a virtual environment](https://virtualenv.pypa.io/en/latest/installation.html) for development and testing.
@@ -377,53 +365,6 @@ python3 tests/training.py
377365
deactivate
378366
```
379367

380-
## Release notes
381-
382-
### Version 0.5.2
383-
384-
New features:
385-
386-
- Allow EC signatures in DER format from signers and verify signature format during validation.
387-
- Fix bug in signing audio and video files in ISO Base Media File Format (BMFF).
388-
- Add the ability to verify PDF files (but not to sign them).
389-
- Increase speed of `sign_file` by 2x or more, when using file paths (uses native Rust file I/O).
390-
- Fixes for RIFF and GIF formats.
391-
392-
### Version 0.5.0
393-
394-
New features in this release:
395-
396-
- Rewrites the API to be stream-based using a Builder / Reader model.
397-
- The functions now support throwing `c2pa.Error` values, caught with `try`/`except`.
398-
- Instead of `c2pa.read_file` you now call `c2pa_api.Reader.from_file` and `reader.json`.
399-
- Read thumbnails and other resources use `reader.resource_to_stream` or `reader.resource.to_file`.
400-
- Instead of `c2pa.sign_file` use `c2pa_api.Builder.from_json` and `builder.sign` or `builder.sign_file`.
401-
- Add thumbnails or other resources with `builder.add_resource` or `builder.add_resource_file`.
402-
- Add Ingredients with `builder.add_ingredient` or `builder.add_ingredient_file`.
403-
- You can archive a `Builder` using `builder.to_archive` and reconstruct it with `builder.from_archive`.
404-
- Signers can be constructed with `c2pa_api.create_signer`.
405-
- The signer now requires a signing function to keep private keys private.
406-
- Example signing functions are provided in c2pa_api.py
407-
408-
### Version 0.4.0
409-
410-
This release:
411-
412-
- Changes the name of the import from `c2pa-python` to `c2pa`.
413-
- Supports pre-built platform wheels for macOS, Windows and [manylinux](https://github.com/pypa/manylinux).
414-
415-
### Version 0.3.0
416-
417-
This release includes some breaking changes to align with future APIs:
418-
419-
- `C2paSignerInfo` moves the `alg` to the first parameter from the 3rd.
420-
- `c2pa.verify_from_file_json` is now `c2pa.read_file`.
421-
- `c2pa.ingredient_from_file_json` is now `c2pa.read_ingredient_file`.
422-
- `c2pa.add_manifest_to_file_json` is now `c2pa.sign_file`.
423-
- There are many more specific errors types now, and Error messages always start with the name of the error i.e (str(err.value).startswith("ManifestNotFound")).
424-
- The ingredient thumbnail identifier may be jumbf uri reference if a valid thumb already exists in the active manifest.
425-
- Extracted file paths for read_file now use a folder structure and different naming conventions.
426-
427368
## License
428369

429370
This package is distributed under the terms of both the [MIT license](https://github.com/contentauth/c2pa-python/blob/main/LICENSE-MIT) and the [Apache License (Version 2.0)](https://github.com/contentauth/c2pa-python/blob/main/LICENSE-APACHE).

docs/release-notes.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Release notes
2+
3+
## Version 0.6.0
4+
5+
<!-- Get features and updates -->
6+
7+
See [Release tag 0.6.0](https://github.com/contentauth/c2pa-python/releases/tag/v0.6.0).
8+
9+
## Version 0.5.2
10+
11+
New features:
12+
13+
- Allow EC signatures in DER format from signers and verify signature format during validation.
14+
- Fix bug in signing audio and video files in ISO Base Media File Format (BMFF).
15+
- Add the ability to verify PDF files (but not to sign them).
16+
- Increase speed of `sign_file` by 2x or more, when using file paths (uses native Rust file I/O).
17+
- Fixes for RIFF and GIF formats.
18+
19+
## Version 0.5.0
20+
21+
New features in this release:
22+
23+
- Rewrites the API to be stream-based using a Builder / Reader model.
24+
- The functions now support throwing `c2pa.Error` values, caught with `try`/`except`.
25+
- Instead of `c2pa.read_file` you now call `c2pa_api.Reader.from_file` and `reader.json`.
26+
- Read thumbnails and other resources use `reader.resource_to_stream` or `reader.resource.to_file`.
27+
- Instead of `c2pa.sign_file` use `c2pa_api.Builder.from_json` and `builder.sign` or `builder.sign_file`.
28+
- Add thumbnails or other resources with `builder.add_resource` or `builder.add_resource_file`.
29+
- Add Ingredients with `builder.add_ingredient` or `builder.add_ingredient_file`.
30+
- You can archive a `Builder` using `builder.to_archive` and reconstruct it with `builder.from_archive`.
31+
- Signers can be constructed with `c2pa_api.create_signer`.
32+
- The signer now requires a signing function to keep private keys private.
33+
- Example signing functions are provided in c2pa_api.py
34+
35+
## Version 0.4.0
36+
37+
This release:
38+
39+
- Changes the name of the import from `c2pa-python` to `c2pa`.
40+
- Supports pre-built platform wheels for macOS, Windows and [manylinux](https://github.com/pypa/manylinux).
41+
42+
## Version 0.3.0
43+
44+
This release includes some breaking changes to align with future APIs:
45+
46+
- `C2paSignerInfo` moves the `alg` to the first parameter from the 3rd.
47+
- `c2pa.verify_from_file_json` is now `c2pa.read_file`.
48+
- `c2pa.ingredient_from_file_json` is now `c2pa.read_ingredient_file`.
49+
- `c2pa.add_manifest_to_file_json` is now `c2pa.sign_file`.
50+
- There are many more specific errors types now, and Error messages always start with the name of the error i.e (str(err.value).startswith("ManifestNotFound")).
51+
- The ingredient thumbnail identifier may be jumbf uri reference if a valid thumb already exists in the active manifest.
52+
- Extracted file paths for read_file now use a folder structure and different naming conventions.

0 commit comments

Comments
 (0)