Metadata-Version: 2.4
Name: trufo
Version: 0.3.3
Summary: Trufo SDK for content provenance API services.
License-Expression: Apache-2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=41.0
Requires-Dist: PyJWT>=2.6
Requires-Dist: requests>=2.28
Requires-Dist: uuid-utils>=0.6
Provides-Extra: provenance
Requires-Dist: trufo-provenance[c2pa]<0.2,>=0.1.2; extra == "provenance"
Provides-Extra: test
Requires-Dist: pytest>=7.0; extra == "test"
Dynamic: license-file

# Trufo

Open-source library to simplify interactions with the Trufo Provenance Service (TPS).

The library is currently in an alpha release state. Please be advised that until the library enters a beta release state, there may be drift in the library schema.

The Trufo Provenance Platform is under active beta development, with new provenance features and product workflows being added regularly. If you are building against the platform and have questions about the right integration path, please contact [support@trufo.ai](mailto:support@trufo.ai). We are happy to help.

## Optional Provenance Engine

*Note: Production usage of this feature is still pending C2PA Conformance Approval.*

When using the standard C2PA Signing API, the raw digital media content is sent to the Trufo server for processing. In cases where data privacy is important or where the content file is large, a distributed API is available where most media processing is local (and signing is remote, on Trufo servers). To enable this functionality, please install the `provenance` extra:

```bash
pip install "trufo[provenance]"
```

For `trufo` version `0.3.1`, this resolves to the `trufo-provenance` `0.1.x`
implementation package. The relevant first fixed build is `trufo-provenance==0.1.1`.
That build bundles the native C2PA bridge for Linux only; macOS and Windows
wheels are not published yet.

*Note: Currently, the `provenance` installation is only supported on Linux machines.*

## Workflow Examples (Quickstart)

There are a number of documents to get you started quickly with specific use cases:


| Use case                           | Trufo Product                                                          | Quickstart                                                             |
| ---------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| Auth Setup                         | —                                                                      | [docs/quickstart/0_auth.md](docs/quickstart/0_auth.md)                 |
| C2PA Signing Certificate CSRs      | [C2PA Signing Certificates](https://app.trufo.ai/tca/certs/c2pa)       | [docs/quickstart/1_c2pa_cert.md](docs/quickstart/1_c2pa_cert.md)       |
| AI Labeling                        | [C2PA & CAWG Signing API](https://app.trufo.ai/prov/apis/c2pa-signing) | [docs/quickstart/2_ai_labeling.md](docs/quickstart/2_ai_labeling.md)   |
| Organization Stamping & Assertions | [C2PA & CAWG Signing API](https://app.trufo.ai/prov/apis/c2pa-signing) | [docs/quickstart/3_cawg_publish.md](docs/quickstart/3_cawg_publish.md) |


## Reference Documentation

The full reference documentation is spread across the following files:

| Service | Document                                     | Description                                                  |
| ------- | -------------------------------------------- | ------------------------------------------------------------ |
| Auth    | [docs/api/api_auth.md](docs/api/api_auth.md) | Headers, access tokens, sessions                             |
| TPS     | [docs/api/api_c2pa.md](docs/api/api_c2pa.md) | C2PA signing endpoints                                       |
| TCA     | [docs/api/tca_ca.md](docs/api/tca_ca.md)     | Certificate Authority — enrollment, revocation, timestamping |
| TCA     | [docs/api/tca_ra.md](docs/api/tca_ra.md)     | Registration Authority — instances, credentials, CSR JWTs   |
| CLI     | [docs/cli.md](docs/cli.md)                   | Credential management (dev tool; use the Python API in prod) |


