Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
138ff74
feat: c2pa-rs and c2pa_c_ffi 0.68.0 update (#189)
tmathern Nov 1, 2025
b272adb
chore: Update c2pa version from v0.68.0 to v0.69.0 (#190)
tmathern Nov 5, 2025
43b460e
fix: Version bump from c2pa-rs and c2pa-c-ffi from v0.69.0 to v0.70.0…
tmathern Nov 6, 2025
e141978
fix: Version bump from c2pa-rs v0.70.0 to v0.71.0 (#193)
tmathern Nov 8, 2025
4ed3ce8
feat: Add set_intent APIs (#194)
tmathern Nov 19, 2025
cc92072
Merge branch 'main' into vNext
tmathern Nov 19, 2025
dde6609
chore: Update c2pa version to v0.72.0 (#198)
tmathern Nov 20, 2025
838639c
chore: Update c2pa version to v0.72.1 (#200)
tmathern Dec 5, 2025
35471a5
chore: Update c2pa version to v0.73.0 (#201)
tmathern Dec 15, 2025
08e64aa
Merge branch 'main' into vNext
tmathern Dec 19, 2025
c10bdc9
Merge branch 'main' into vNext
tmathern Dec 19, 2025
125341a
chore: Update c2pa version to v0.73.1 (#204)
tmathern Dec 20, 2025
8223b74
Merge branch 'main' into vNext
tmathern Dec 27, 2025
3d8387f
chore: Update to native version 0.73.2 (#210)
tmathern Jan 5, 2026
f187bee
fix: Improve typings for errors (#213)
tmathern Jan 7, 2026
a01dd37
feat: Add a factory method to the Reader class (#214)
tmathern Jan 7, 2026
9192996
Merge branch 'main' into vNext
tmathern Jan 7, 2026
99ab6d9
chore: Bump to c2pa-rs v0.74.0 (#215)
tmathern Jan 8, 2026
9f5dd8b
fix: Retrigger tests
tmathern Jan 9, 2026
fb54175
chore: Update c2pa version to v0.75.2
tmathern Jan 15, 2026
9f2c9f6
chore: Update SDK version in unit tests
tmathern Jan 15, 2026
946cc97
Merge branch 'main' into vNext
tmathern Jan 15, 2026
16058b3
fix: export C2paBuilderIntent
tmathern Jan 16, 2026
659399c
fix: c2pa v0.75.4 (#217)
tmathern Jan 17, 2026
5577282
Merge branch 'main' into vNext
tmathern Jan 20, 2026
732993f
chore: Update c2pa version to v0.75.6 (#219)
tmathern Jan 22, 2026
682f039
chore: Update c2pa version to v0.75.7 (#220)
tmathern Jan 27, 2026
d558312
fix: Bump c2pa version to v0.75.8 (#222)
tmathern Jan 28, 2026
86d6ca1
fix: Export types moved files (#221)
tmathern Jan 30, 2026
f19695d
chore: Bump c2pa-rs version to c2pa-v0.75.10 (#223)
tmathern Feb 2, 2026
6104a0d
chore: Update c2pa-native-version.txt to use c2pa v0.75.16 (#224)
tmathern Feb 5, 2026
14aabfc
chore: Up to c2pa-v0.75.19 (#226)
tmathern Feb 9, 2026
4ee7319
Merge branch 'main' into vNext
tmathern Feb 9, 2026
6adc1ba
chore Update c2pa-native-version.txt to c2pa-v0.75.21 (#227)
tmathern Feb 22, 2026
d34087f
feat: Context and Settings WIP
Mar 4, 2026
ee5d047
fix: Docs 1
Mar 4, 2026
7d9f472
fix: WIP
Mar 4, 2026
2e58197
fix: WIP
Mar 4, 2026
7ecfb0b
chore(deps): bump cryptography from 45.0.6 to 46.0.5 (#229)
dependabot[bot] Mar 4, 2026
f0cf765
Delete docs/faqs.md
tmathern Mar 4, 2026
bc64806
Update settings.md
tmathern Mar 4, 2026
9e43c53
Update usage instructions for context managers
tmathern Mar 4, 2026
431198c
fix: WIP
tmathern Mar 4, 2026
52675d5
ci: Merge remote-tracking branch 'refs/remotes/origin/mathern/context…
tmathern Mar 4, 2026
55e1d29
fix: Docs
tmathern Mar 4, 2026
8e34eac
fix: Clean up
tmathern Mar 4, 2026
477b5fd
fix: Move docs out
tmathern Mar 4, 2026
5c97dcc
Delete tests/test_docs.py
tmathern Mar 4, 2026
a2c2eb9
fix: Switch to Interface and not protocol
tmathern Mar 4, 2026
b3f7d58
ci: Merge remote-tracking branch 'refs/remotes/origin/mathern/context…
tmathern Mar 4, 2026
2b0318e
fix: Updates
Mar 4, 2026
64c076d
fix: Update things
Mar 4, 2026
042910c
fix: CLean up notes
Mar 4, 2026
90012c1
fix: Require funcs
Mar 5, 2026
b878b21
fix: Examples
Mar 5, 2026
e2621df
fix: Refactor
Mar 5, 2026
8b9fb93
fix: Refactor
Mar 5, 2026
d37245b
fix: Unnest example
Mar 5, 2026
8a55f5a
fix: The exampels
Mar 5, 2026
ba68755
fix: The useless refactors
Mar 5, 2026
d214ed6
fix: Refactor
Mar 5, 2026
4f58186
fix: Refactor 2
Mar 5, 2026
55a4418
fix: Refactor 3
Mar 5, 2026
8f3f21e
fix: Refactor
Mar 5, 2026
0552f5d
fix: Refactor 4
Mar 5, 2026
d02be00
fix: Version bump
Mar 5, 2026
28d683f
fix: Deprec warning
Mar 5, 2026
f38e21d
fix: Test also the contextual APIs in threading
tmathern Mar 5, 2026
4db0566
ci: Merge remote-tracking branch 'refs/remotes/origin/mathern/context…
tmathern Mar 5, 2026
e39a64c
fix: Refactor
tmathern Mar 5, 2026
de05365
fix: Native handles handling refactoring (#232)
tmathern Mar 5, 2026
21f3d95
fix: Format
tmathern Mar 5, 2026
bd9c172
fix: Tests
tmathern Mar 5, 2026
c75fc27
fix: Test with trust
Mar 5, 2026
60380d1
Clean up comments in read.py
tmathern Mar 5, 2026
2aeb453
Update read.py
tmathern Mar 5, 2026
daf43dd
fix: Typos
Mar 5, 2026
a4b0ae1
ci: Merge remote-tracking branch 'refs/remotes/origin/mathern/context…
Mar 5, 2026
b99f819
fix: Typos
Mar 5, 2026
ceeae56
fix: Notes for WIP
Mar 5, 2026
5f038b6
fix: Refactor
Mar 5, 2026
52889b0
Remove version vNext details from release notes
tmathern Mar 6, 2026
42d52f2
fix: docs
Mar 6, 2026
ddd2b6d
ci: Merge remote-tracking branch 'refs/remotes/origin/mathern/context…
Mar 6, 2026
2bb9697
fix:signfile
Mar 6, 2026
2b378e4
Merge branch 'vNext' into mathern/context
tmathern Mar 6, 2026
f6ba198
fix: Clean up
tmathern Mar 6, 2026
de15a8b
fix: Clean up
tmathern Mar 6, 2026
5525809
fix: Remove unused APIs
Mar 6, 2026
2f31f42
feat: Drop the WIP docs
tmathern Mar 6, 2026
0f186a3
fix: Doc in branch is reference, this one is done
tmathern Mar 6, 2026
75c4ff7
fix: Remove unused APIs, with_archive added
Mar 6, 2026
9033698
fix: Clean up notes and tests
Mar 6, 2026
0002723
ci: Merge branch 'mathern/context' into mathern/docs-for-python
Mar 6, 2026
de6f4c9
fix: WIP docs
Mar 7, 2026
d42c138
fix: Docs
Mar 7, 2026
fa7d6ef
fix: Docs
Mar 7, 2026
f3ed237
fix: Docs
Mar 7, 2026
862015a
fix: Docs
Mar 7, 2026
b3accbd
fix: Docs
Mar 7, 2026
b3eb697
fix: Docs
Mar 7, 2026
6cf0207
fix: Docs
Mar 7, 2026
10cdfe9
fix: Docs
Mar 7, 2026
75aa399
fix: Docs
Mar 7, 2026
c8040e9
fix: Docs
Mar 7, 2026
a10bb65
fix: Docs
Mar 7, 2026
df7d75c
fix: Docs
Mar 7, 2026
5c00639
fix: Docs
Mar 8, 2026
d35489e
fix: Double free
Mar 8, 2026
d4bac74
ci: Merge branch 'mathern/context' into mathern/docs-for-python
Mar 8, 2026
36a6441
fix: Wording and examples
Mar 9, 2026
4920322
fix: Wording and examples
Mar 9, 2026
b06f6d9
fix: Ownership handling
Mar 9, 2026
67d699c
fix: Improve resources handling
Mar 9, 2026
63db267
chore(deps): bump cryptography from 45.0.6 to 46.0.5 (#236)
dependabot[bot] Mar 9, 2026
006d2ab
fix: Docs
tmathern Mar 9, 2026
a0d7c02
fix: refactor & docs
tmathern Mar 9, 2026
30dda7b
fix: refactor & docs
tmathern Mar 9, 2026
b39a809
fix: refactor & docs
tmathern Mar 9, 2026
4dd8198
fix: refactor
tmathern Mar 9, 2026
58595ea
fix: refactor
tmathern Mar 9, 2026
06baf6f
Merge branch 'mathern/context' into mathern/docs-for-python
tmathern Mar 9, 2026
ebf6cdc
feat: Fragment APIs (e.g. for video) (#237)
tmathern Mar 9, 2026
0ff80cd
Merge branch 'mathern/context' into mathern/docs-for-python
tmathern Mar 9, 2026
e12750c
fix: Only show APIs with cotnext
tmathern Mar 9, 2026
4b6dc47
feat: Context+Settings APIs (#230)
tmathern Mar 13, 2026
180bf6a
Merge branch 'vNext' into mathern/docs-for-python
tmathern Mar 13, 2026
557b266
fix: Merge commit
tmathern Mar 13, 2026
f8b166a
fix: Merge commit 2
tmathern Mar 13, 2026
b91a72a
Add combined context and settings doc
crandmck Mar 13, 2026
b0f4be7
Remove context.md and settings.md which were combined into context-se…
crandmck Mar 13, 2026
3697026
Edit intents and make it follow style, org of c2pa-c version
crandmck Mar 13, 2026
70ffa3c
Remove sections about not using Context, other clean up
crandmck Mar 16, 2026
ebc70b7
General copy edits
crandmck Mar 16, 2026
0622915
chore: Bump c2pa-v0.78.3 (#240)
tmathern Mar 16, 2026
3654cc2
Merge pull request #235 from contentauth/mathern/docs-for-python
crandmck Mar 16, 2026
dd8a469
chore: Update c2pa-rs to v 0.78.4 (#241)
tmathern Mar 16, 2026
4a6cf33
fix: Update pyproject.toml to bump version
tmathern Mar 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ rebuild: clean-c2pa-env install-deps download-native-artifacts build-python
run-examples:
python3 ./examples/sign.py
python3 ./examples/sign_info.py
python3 ./examples/no_thumbnails.py
python3 ./examples/training.py
rm -rf output/

Expand Down
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ Features:
- Add assertions and ingredients to assets.
- Examples and unit tests to demonstrate usage.

<div style={{display: 'none'}}>

For the best experience, read the docs on the [CAI Open Source SDK documentation website](https://opensource.contentauthenticity.org/docs/c2pa-c).

If you want to view the documentation in GitHub, see:
- [Using the Python library](docs/usage.md)
- [Supported formats](https://github.com/contentauth/c2pa-rs/blob/main/docs/supported-formats.md)
- [Configuring the SDK using `Context` and `Settings`](docs/context-settings.md)
- [Using Builder intents](docs/intents.md) to ensure spec-compliant manifests
- Using [working stores and archvies](docs/working-stores.md)
- Selectively constructing manifests by [filtering actions and ingredients](docs/selective-manifests.md)
- [Diagram of public classes in the Python library and their relationships](docs/class-diagram.md)
- [Release notes](docs/release-notes.md)

</div>

## Prerequisites

This library requires Python version 3.10+.
Expand Down Expand Up @@ -40,7 +56,9 @@ See the [`examples` directory](https://github.com/contentauth/c2pa-python/tree/m

## API reference documentation

See [the section in Contributing to the project](https://github.com/contentauth/c2pa-python/blob/main/docs/project-contributions.md#api-reference-documentation).
Documentation is published at [github.io/c2pa-python/api/c2pa](https://contentauth.github.io/c2pa-python/api/c2pa/index.html).

To build documentation locally, refer to [this section in Contributing to the project](https://github.com/contentauth/c2pa-python/blob/main/docs/project-contributions.md#api-reference-documentation).

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion c2pa-native-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c2pa-v0.67.1
c2pa-v0.78.4
135 changes: 135 additions & 0 deletions docs/class-diagram.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@

# Class diagram

This diagram shows the public classes in the Python library and their relationships.

```mermaid
classDiagram
direction LR

class Settings {
+from_json(json_str) Settings$
+from_dict(config) Settings$
+set(path, value) Settings
+update(data) Settings
+close()
+is_valid bool
}

class ContextProvider {
<<abstract>>
+is_valid bool*
+execution_context*
}

class Context {
+from_json(json_str, signer) Context$
+from_dict(config, signer) Context$
+has_signer bool
+is_valid bool
+close()
}

class Reader {
+get_supported_mime_types() list~str~$
+try_create(format_or_path, stream, manifest_data, context) Reader | None$
+json() str
+detailed_json() str
+get_active_manifest() dict | None
+get_manifest(label) dict
+get_validation_state() str | None
+get_validation_results() dict | None
+resource_to_stream(uri, stream) int
+is_embedded() bool
+get_remote_url() str | None
+close()
}

class Builder {
+from_json(manifest_json, context) Builder$
+from_archive(stream) Builder$
+get_supported_mime_types() list~str~$
+set_no_embed()
+set_remote_url(url)
+set_intent(intent, digital_source_type)
+add_resource(uri, stream)
+add_ingredient(json, format, source)
+add_action(action_json)
+to_archive(stream)
+with_archive(stream) Builder
+sign(signer, format, source, dest) bytes
+sign(format, source, dest) bytes
+sign_file(source_path, dest_path, signer) bytes
+close()
}

class Signer {
+from_info(signer_info) Signer$
+from_callback(callback, alg, certs, tsa_url) Signer$
+reserve_size() int
+close()
}

class C2paSignerInfo {
<<ctypes.Structure>>
+alg
+sign_cert
+private_key
+ta_url
}

class C2paSigningAlg {
<<IntEnum>>
ES256
ES384
ES512
PS256
PS384
PS512
ED25519
}

class C2paBuilderIntent {
<<IntEnum>>
CREATE
EDIT
UPDATE
}

class C2paDigitalSourceType {
<<IntEnum>>
DIGITAL_CAPTURE
DIGITAL_CREATION
TRAINED_ALGORITHMIC_MEDIA
...
}

class C2paError {
<<Exception>>
+message str
}

class C2paError_Subtypes {
<<nested classes>>
ManifestNotFound
NotSupported
Json
Io
Verify
Signature
...
}

ContextProvider <|-- Context : extends
Settings --> Context : optional input
Signer --> Context : optional, consumed
C2paSignerInfo --> Signer : creates via from_info
C2paSigningAlg --> C2paSignerInfo : alg field
C2paSigningAlg --> Signer : from_callback alg
Context --> Reader : context=
Context --> Builder : context=
Signer --> Builder : sign(signer)
C2paBuilderIntent --> Builder : set_intent
C2paDigitalSourceType --> Builder : set_intent
C2paError --> C2paError_Subtypes : subclasses
```
Loading
Loading