Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v4

# Release-please for develop branch (creates alpha prereleases)
- uses: googleapis/release-please-action@v4
- uses: googleapis/release-please-action@v5
if: github.ref == 'refs/heads/develop'
id: release-develop
with:
Expand All @@ -37,7 +37,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

# Release-please for main branch (creates stable releases)
- uses: googleapis/release-please-action@v4
- uses: googleapis/release-please-action@v5
if: github.ref == 'refs/heads/main'
id: release-main
with:
Expand Down
1 change: 1 addition & 0 deletions .release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"packages/otdf-python": {
"release-type": "python",
"package-name": "otdf-python",
"changelog-path": "CHANGELOG.md",
"extra-files": [
"packages/otdf-python/pyproject.toml",
{
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## [0.7.2](https://github.com/b-long/opentdf-python-sdk/compare/otdf-python-v0.7.1...otdf-python-v0.7.2) (TBD)


### Bug Fixes

* fix D205 docstring formatting across otdf-python source files ([#149](https://github.com/b-long/opentdf-python-sdk/issues/149)) ([c0910cb](https://github.com/b-long/opentdf-python-sdk/commit/c0910cbb599af4f05e1bb5ca5d130e85d39eb4fa))
* fix/increase testing, fix misconfiguration ([#148](https://github.com/b-long/opentdf-python-sdk/issues/148)) ([1dc8c45](https://github.com/b-long/opentdf-python-sdk/commit/1dc8c4557bdcbcbf74b2f663c4e190664047cb7f))
* **main:** fix release issue, required arguments from workspace root ([#147](https://github.com/b-long/opentdf-python-sdk/issues/147)) ([668f00a](https://github.com/b-long/opentdf-python-sdk/commit/668f00a083990b5cea686e5885216e0359ceaf55))
* use --package flag with uv version for workspace layout ([#144](https://github.com/b-long/opentdf-python-sdk/issues/144)) ([12acfbb](https://github.com/b-long/opentdf-python-sdk/commit/12acfbb4f8d99c8c745f35cbd7bddfc41e63b8b4))

## [0.7.1](https://github.com/b-long/opentdf-python-sdk/compare/otdf-python-v0.7.0...otdf-python-v0.7.1) (2026-06-04)


### Documentation

* fix project structure path in README ([#145](https://github.com/b-long/opentdf-python-sdk/issues/145)) ([c10f98b](https://github.com/b-long/opentdf-python-sdk/commit/c10f98bb67e823a8bd061c8100d8493d2083699f))

## [0.7.0](https://github.com/b-long/opentdf-python-sdk/compare/otdf-python-v0.6.0...otdf-python-v0.7.0) (2026-06-04)


### Features

* **main:** update dependencies & switch to uv workspace layout ([#142](https://github.com/b-long/opentdf-python-sdk/issues/142)) ([649f63c](https://github.com/b-long/opentdf-python-sdk/commit/649f63ce4eee4b564b92afd3dbda2b3e3d55803e))

## [0.6.0](https://github.com/b-long/opentdf-python-sdk/compare/otdf-python-v0.5.0...otdf-python-v0.6.0) (2026-05-21)


Expand Down
15 changes: 0 additions & 15 deletions packages/otdf-python/CHANGELOG.md

This file was deleted.

1 change: 1 addition & 0 deletions packages/otdf-python/src/otdf_python/auth_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@dataclass
class AuthHeaders:
"""Represents authentication headers used in token-based authorization.

This class holds authorization and DPoP (Demonstrating Proof of Possession) headers
that are used in token-based API requests.
"""
Expand Down
4 changes: 4 additions & 0 deletions packages/otdf-python/src/otdf_python/kas_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ def _create_signed_request_jwt(
self, policy_json, client_public_key, key_access, session_key_type=None
):
"""Create a signed JWT for the rewrap request.

The JWT is signed with the DPoP private key.

Args:
Expand Down Expand Up @@ -400,6 +401,7 @@ def _create_signed_request_jwt(

def _create_connect_rpc_signed_token(self, key_access, policy_json):
"""Create a signed token specifically for Connect RPC requests.

For now, this delegates to the existing JWT creation method.
"""
return self._create_signed_request_jwt(
Expand Down Expand Up @@ -469,6 +471,7 @@ def _create_dpop_proof(self, method, url, access_token=None):

def get_public_key(self, kas_info):
"""Get KAS public key using Connect RPC.

Checks cache first if available.
"""
try:
Expand Down Expand Up @@ -569,6 +572,7 @@ def _prepare_ec_keypair(self, session_key_type):

def _prepare_rsa_keypair(self):
"""Prepare RSA key pair for unwrapping, reusing if possible.

Uses separate ephemeral keys for encryption (not DPoP keys).

Returns:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""KASConnectRPCClient: Handles Connect RPC communication with the Key Access Service (KAS).

This class encapsulates all interactions with otdf_python_proto.
"""

Expand Down
1 change: 1 addition & 0 deletions packages/otdf-python/src/otdf_python/kas_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@dataclass
class KASInfo:
"""Configuration for Key Access Server (KAS) information.

This class stores details about a Key Access Server including its URL,
public key, key ID, default status, and cryptographic algorithm.
"""
Expand Down
1 change: 1 addition & 0 deletions packages/otdf-python/src/otdf_python/key_type_constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Constants for session key types used in the KAS client.

This matches the Java SDK's KeyType enum pattern.
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def from_bytes(

def as_bytes(self) -> bytes:
"""Convert the signature structure to bytes.

Raises ValueError if r_value or s_value is None.
"""
if self.r_value is None or self.s_value is None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def __init__(self, **kwargs):

class PolicyBindingSerializer:
"""Handles serialization and deserialization of policy bindings.

This class provides static methods to convert between JSON representations
and PolicyBinding objects.
"""
Expand Down
2 changes: 2 additions & 0 deletions packages/otdf-python/src/otdf_python/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class KAS(AbstractContextManager):

def get_public_key(self, kas_info: Any) -> Any:
"""Retrieve the public key from KAS for RSA operations.

If the public key is cached, returns the cached value.
Otherwise, makes a request to the KAS.

Expand Down Expand Up @@ -217,6 +218,7 @@ class Services(AbstractContextManager):

def kas(self) -> KAS:
"""Return the KAS client for key access operations.

This should be implemented to return an instance of KAS.
"""
raise NotImplementedError
Expand Down
1 change: 1 addition & 0 deletions packages/otdf-python/src/otdf_python/tdf_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

class TDFReader:
"""TDFReader is responsible for reading and processing Trusted Data Format (TDF) files.

The class initializes with a TDF file channel, extracts the manifest and payload entries,
and provides methods to retrieve the manifest content, read payload bytes, and read policy objects.
"""
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ extend-exclude = ["packages/otdf-python-proto/src/"]
"tests/**" = ["D100", "D101", "D102", "D103", "D107", "D400", "D401", "D415"]
"packages/otdf-python-proto/**" = ["D"] # Ignore all D (docstring) rules for generated proto files

# TODO: Remaining work - 4 buckets to fix (140 errors remaining):
# TODO: Remaining work
# Bucket #1: D102 (missing method docstrings) - 98 errors
# Bucket #2: D105 (missing magic method docstrings) - 23 errors
# Bucket #3: D205 (blank line formatting), D103, D417, D104 - 19 errors
"packages/otdf-python/src/**" = ["D102", "D105", "D205"]
"packages/otdf-python/src/**" = ["D102", "D105"]
Comment thread
b-long marked this conversation as resolved.
Loading