otdf-python 0.3.2__tar.gz → 0.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. {otdf_python-0.3.2 → otdf_python-0.3.3}/.github/workflows/build-python.yaml +0 -3
  2. otdf_python-0.3.3/.release-please-manifest.json +3 -0
  3. {otdf_python-0.3.2 → otdf_python-0.3.3}/CHANGELOG.md +7 -0
  4. {otdf_python-0.3.2 → otdf_python-0.3.3}/PKG-INFO +1 -3
  5. {otdf_python-0.3.2 → otdf_python-0.3.3}/README.md +0 -2
  6. otdf_python-0.3.3/docs/CONNECT_RPC.md +156 -0
  7. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/README.md +2 -2
  8. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/pyproject.toml +1 -1
  9. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/scripts/build_connect_proto.sh +1 -1
  10. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/uv.lock +1 -1
  11. {otdf_python-0.3.2 → otdf_python-0.3.3}/pyproject.toml +1 -1
  12. {otdf_python-0.3.2 → otdf_python-0.3.3}/uv.lock +1 -1
  13. otdf_python-0.3.2/.release-please-manifest.json +0 -3
  14. otdf_python-0.3.2/docs/CONNECT_RPC_MIGRATION.md +0 -283
  15. otdf_python-0.3.2/docs/PROTOBUF_SETUP.md +0 -135
  16. {otdf_python-0.3.2 → otdf_python-0.3.3}/.github/check_entitlements.sh +0 -0
  17. {otdf_python-0.3.2 → otdf_python-0.3.3}/.github/start_opentdf_docker.sh +0 -0
  18. {otdf_python-0.3.2 → otdf_python-0.3.3}/.github/workflows/platform-integration-test.yaml +0 -0
  19. {otdf_python-0.3.2 → otdf_python-0.3.3}/.github/workflows/release-please.yaml +0 -0
  20. {otdf_python-0.3.2 → otdf_python-0.3.3}/.github/workflows/test-suite.yaml +0 -0
  21. {otdf_python-0.3.2 → otdf_python-0.3.3}/.gitignore +0 -0
  22. {otdf_python-0.3.2 → otdf_python-0.3.3}/.pre-commit-config.yaml +0 -0
  23. {otdf_python-0.3.2 → otdf_python-0.3.3}/.release-please-config-develop.json +0 -0
  24. {otdf_python-0.3.2 → otdf_python-0.3.3}/.release-please-config.json +0 -0
  25. {otdf_python-0.3.2 → otdf_python-0.3.3}/.release-please-manifest-develop.json +0 -0
  26. {otdf_python-0.3.2 → otdf_python-0.3.3}/.vscode/extensions.json +0 -0
  27. {otdf_python-0.3.2 → otdf_python-0.3.3}/.vscode/settings.json +0 -0
  28. {otdf_python-0.3.2 → otdf_python-0.3.3}/LICENSE +0 -0
  29. {otdf_python-0.3.2 → otdf_python-0.3.3}/conftest.py +0 -0
  30. {otdf_python-0.3.2 → otdf_python-0.3.3}/docs/DEVELOPING.md +0 -0
  31. {otdf_python-0.3.2 → otdf_python-0.3.3}/docs/LEGACY_VERSION.md +0 -0
  32. {otdf_python-0.3.2 → otdf_python-0.3.3}/docs/RELEASES.md +0 -0
  33. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/buf.gen.yaml +0 -0
  34. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/buf.lock +0 -0
  35. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/buf.yaml +0 -0
  36. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/authorization/authorization.proto +0 -0
  37. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/authorization/v2/authorization.proto +0 -0
  38. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/common/common.proto +0 -0
  39. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/entity/entity.proto +0 -0
  40. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/entityresolution/entity_resolution.proto +0 -0
  41. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/entityresolution/v2/entity_resolution.proto +0 -0
  42. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/kas/kas.proto +0 -0
  43. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/logger/audit/test.proto +0 -0
  44. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/policy/actions/actions.proto +0 -0
  45. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/policy/attributes/attributes.proto +0 -0
  46. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/policy/kasregistry/key_access_server_registry.proto +0 -0
  47. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/policy/keymanagement/key_management.proto +0 -0
  48. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/policy/namespaces/namespaces.proto +0 -0
  49. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/policy/objects.proto +0 -0
  50. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/policy/registeredresources/registered_resources.proto +0 -0
  51. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/policy/resourcemapping/resource_mapping.proto +0 -0
  52. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/policy/selectors.proto +0 -0
  53. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/policy/subjectmapping/subject_mapping.proto +0 -0
  54. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/policy/unsafe/unsafe.proto +0 -0
  55. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/proto-files/wellknownconfiguration/wellknown_configuration.proto +0 -0
  56. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/scripts/generate_connect_proto.py +0 -0
  57. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/scripts/setup_connect_rpc.py +0 -0
  58. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/__init__.py +0 -0
  59. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/authorization/__init__.py +0 -0
  60. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/authorization/authorization_pb2.py +0 -0
  61. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/authorization/authorization_pb2.pyi +0 -0
  62. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/authorization/authorization_pb2_connect.py +0 -0
  63. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/authorization/v2/authorization_pb2.py +0 -0
  64. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/authorization/v2/authorization_pb2.pyi +0 -0
  65. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/authorization/v2/authorization_pb2_connect.py +0 -0
  66. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/common/__init__.py +0 -0
  67. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/common/common_pb2.py +0 -0
  68. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/common/common_pb2.pyi +0 -0
  69. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/entity/__init__.py +0 -0
  70. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/entity/entity_pb2.py +0 -0
  71. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/entity/entity_pb2.pyi +0 -0
  72. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/entityresolution/__init__.py +0 -0
  73. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/entityresolution/entity_resolution_pb2.py +0 -0
  74. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/entityresolution/entity_resolution_pb2.pyi +0 -0
  75. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/entityresolution/entity_resolution_pb2_connect.py +0 -0
  76. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/entityresolution/v2/entity_resolution_pb2.py +0 -0
  77. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/entityresolution/v2/entity_resolution_pb2.pyi +0 -0
  78. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/entityresolution/v2/entity_resolution_pb2_connect.py +0 -0
  79. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/kas/__init__.py +0 -0
  80. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/kas/kas_pb2.py +0 -0
  81. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/kas/kas_pb2.pyi +0 -0
  82. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/kas/kas_pb2_connect.py +0 -0
  83. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/__init__.py +0 -0
  84. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/authorization/authorization_pb2_grpc.py +0 -0
  85. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/authorization/v2/authorization_pb2_grpc.py +0 -0
  86. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/common/common_pb2_grpc.py +0 -0
  87. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/entity/entity_pb2_grpc.py +0 -0
  88. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/entityresolution/entity_resolution_pb2_grpc.py +0 -0
  89. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/entityresolution/v2/entity_resolution_pb2_grpc.py +0 -0
  90. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/kas/kas_pb2_grpc.py +0 -0
  91. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/logger/audit/test_pb2_grpc.py +0 -0
  92. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/actions/actions_pb2_grpc.py +0 -0
  93. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/attributes/attributes_pb2_grpc.py +0 -0
  94. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/kasregistry/key_access_server_registry_pb2_grpc.py +0 -0
  95. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/keymanagement/key_management_pb2_grpc.py +0 -0
  96. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/namespaces/namespaces_pb2_grpc.py +0 -0
  97. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/objects_pb2_grpc.py +0 -0
  98. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/registeredresources/registered_resources_pb2_grpc.py +0 -0
  99. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/resourcemapping/resource_mapping_pb2_grpc.py +0 -0
  100. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/selectors_pb2_grpc.py +0 -0
  101. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/subjectmapping/subject_mapping_pb2_grpc.py +0 -0
  102. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/unsafe/unsafe_pb2_grpc.py +0 -0
  103. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/wellknownconfiguration/wellknown_configuration_pb2_grpc.py +0 -0
  104. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/logger/__init__.py +0 -0
  105. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/logger/audit/test_pb2.py +0 -0
  106. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/logger/audit/test_pb2.pyi +0 -0
  107. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/__init__.py +0 -0
  108. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/actions/actions_pb2.py +0 -0
  109. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/actions/actions_pb2.pyi +0 -0
  110. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/actions/actions_pb2_connect.py +0 -0
  111. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/attributes/attributes_pb2.py +0 -0
  112. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/attributes/attributes_pb2.pyi +0 -0
  113. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/attributes/attributes_pb2_connect.py +0 -0
  114. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/kasregistry/key_access_server_registry_pb2.py +0 -0
  115. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/kasregistry/key_access_server_registry_pb2.pyi +0 -0
  116. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/kasregistry/key_access_server_registry_pb2_connect.py +0 -0
  117. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/keymanagement/key_management_pb2.py +0 -0
  118. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/keymanagement/key_management_pb2.pyi +0 -0
  119. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/keymanagement/key_management_pb2_connect.py +0 -0
  120. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/namespaces/namespaces_pb2.py +0 -0
  121. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/namespaces/namespaces_pb2.pyi +0 -0
  122. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/namespaces/namespaces_pb2_connect.py +0 -0
  123. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/objects_pb2.py +0 -0
  124. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/objects_pb2.pyi +0 -0
  125. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/registeredresources/registered_resources_pb2.py +0 -0
  126. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/registeredresources/registered_resources_pb2.pyi +0 -0
  127. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/registeredresources/registered_resources_pb2_connect.py +0 -0
  128. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/resourcemapping/resource_mapping_pb2.py +0 -0
  129. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/resourcemapping/resource_mapping_pb2.pyi +0 -0
  130. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/resourcemapping/resource_mapping_pb2_connect.py +0 -0
  131. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/selectors_pb2.py +0 -0
  132. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/selectors_pb2.pyi +0 -0
  133. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/subjectmapping/subject_mapping_pb2.py +0 -0
  134. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/subjectmapping/subject_mapping_pb2.pyi +0 -0
  135. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/subjectmapping/subject_mapping_pb2_connect.py +0 -0
  136. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/unsafe/unsafe_pb2.py +0 -0
  137. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/unsafe/unsafe_pb2.pyi +0 -0
  138. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/policy/unsafe/unsafe_pb2_connect.py +0 -0
  139. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/wellknownconfiguration/__init__.py +0 -0
  140. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/wellknownconfiguration/wellknown_configuration_pb2.py +0 -0
  141. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/wellknownconfiguration/wellknown_configuration_pb2.pyi +0 -0
  142. {otdf_python-0.3.2 → otdf_python-0.3.3}/otdf-python-proto/src/otdf_python_proto/wellknownconfiguration/wellknown_configuration_pb2_connect.py +0 -0
  143. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/__init__.py +0 -0
  144. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/__main__.py +0 -0
  145. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/address_normalizer.py +0 -0
  146. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/aesgcm.py +0 -0
  147. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/assertion_config.py +0 -0
  148. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/asym_crypto.py +0 -0
  149. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/asym_decryption.py +0 -0
  150. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/asym_encryption.py +0 -0
  151. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/auth_headers.py +0 -0
  152. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/autoconfigure_utils.py +0 -0
  153. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/cli.py +0 -0
  154. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/collection_store.py +0 -0
  155. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/collection_store_impl.py +0 -0
  156. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/config.py +0 -0
  157. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/connect_client.py +0 -0
  158. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/constants.py +0 -0
  159. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/crypto_utils.py +0 -0
  160. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/dpop.py +0 -0
  161. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/ecc_mode.py +0 -0
  162. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/eckeypair.py +0 -0
  163. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/header.py +0 -0
  164. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/invalid_zip_exception.py +0 -0
  165. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/kas_client.py +0 -0
  166. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/kas_connect_rpc_client.py +0 -0
  167. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/kas_info.py +0 -0
  168. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/kas_key_cache.py +0 -0
  169. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/key_type.py +0 -0
  170. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/key_type_constants.py +0 -0
  171. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/manifest.py +0 -0
  172. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/nanotdf.py +0 -0
  173. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/nanotdf_ecdsa_struct.py +0 -0
  174. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/nanotdf_type.py +0 -0
  175. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/policy_binding_serializer.py +0 -0
  176. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/policy_info.py +0 -0
  177. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/policy_object.py +0 -0
  178. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/policy_stub.py +0 -0
  179. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/resource_locator.py +0 -0
  180. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/sdk.py +0 -0
  181. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/sdk_builder.py +0 -0
  182. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/sdk_exceptions.py +0 -0
  183. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/symmetric_and_payload_config.py +0 -0
  184. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/tdf.py +0 -0
  185. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/tdf_reader.py +0 -0
  186. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/tdf_writer.py +0 -0
  187. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/token_source.py +0 -0
  188. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/version.py +0 -0
  189. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/zip_reader.py +0 -0
  190. {otdf_python-0.3.2 → otdf_python-0.3.3}/src/otdf_python/zip_writer.py +0 -0
  191. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/__init__.py +0 -0
  192. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/config_pydantic.py +0 -0
  193. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/integration/conftest.py +0 -0
  194. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/integration/otdfctl_only/test_otdfctl_generated_fixtures.py +0 -0
  195. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/integration/otdfctl_to_python/test_cli_comparison.py +0 -0
  196. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/integration/otdfctl_to_python/test_cli_decrypt.py +0 -0
  197. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/integration/otdfctl_to_python/test_cli_inspect.py +0 -0
  198. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/integration/otdfctl_to_python/test_tdf_reader_integration.py +0 -0
  199. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/integration/python_only/test_kas_client_integration.py +0 -0
  200. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/integration/support_sdk.py +0 -0
  201. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/integration/test_cli_integration.py +0 -0
  202. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/integration/test_cli_tdf_validation.py +0 -0
  203. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/integration/test_data/empty_file.txt +0 -0
  204. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/integration/test_data/sample_binary.png +0 -0
  205. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/integration/test_data/sample_text.txt +0 -0
  206. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/integration/test_data/sample_with_attributes.txt +0 -0
  207. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/integration/test_pe_interaction.py +0 -0
  208. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/mock_crypto.py +0 -0
  209. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/server_logs.py +0 -0
  210. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/support_cli_args.py +0 -0
  211. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/support_common.py +0 -0
  212. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/support_otdfctl.py +0 -0
  213. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/support_otdfctl_args.py +0 -0
  214. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_address_normalizer.py +0 -0
  215. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_aesgcm.py +0 -0
  216. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_assertion_config.py +0 -0
  217. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_asym_encryption.py +0 -0
  218. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_autoconfigure_utils.py +0 -0
  219. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_cli.py +0 -0
  220. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_collection_store.py +0 -0
  221. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_config.py +0 -0
  222. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_crypto_utils.py +0 -0
  223. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_eckeypair.py +0 -0
  224. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_header.py +0 -0
  225. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_inner_classes.py +0 -0
  226. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_kas_client.py +0 -0
  227. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_kas_key_cache.py +0 -0
  228. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_kas_key_management.py +0 -0
  229. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_key_type.py +0 -0
  230. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_log_collection.py +0 -0
  231. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_manifest.py +0 -0
  232. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_manifest_format.py +0 -0
  233. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_nanotdf.py +0 -0
  234. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_nanotdf_ecdsa_struct.py +0 -0
  235. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_nanotdf_integration.py +0 -0
  236. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_nanotdf_type.py +0 -0
  237. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_policy_object.py +0 -0
  238. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_sdk.py +0 -0
  239. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_sdk_builder.py +0 -0
  240. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_sdk_exceptions.py +0 -0
  241. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_sdk_mock.py +0 -0
  242. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_sdk_tdf_integration.py +0 -0
  243. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_tdf.py +0 -0
  244. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_tdf_key_management.py +0 -0
  245. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_tdf_reader.py +0 -0
  246. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_tdf_writer.py +0 -0
  247. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_token_source.py +0 -0
  248. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_url_normalization.py +0 -0
  249. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_use_plaintext_flow.py +0 -0
  250. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_validate_otdf_python.py +0 -0
  251. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_version.py +0 -0
  252. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_zip_reader.py +0 -0
  253. {otdf_python-0.3.2 → otdf_python-0.3.3}/tests/test_zip_writer.py +0 -0
@@ -1,9 +1,6 @@
1
1
  # Build otdf-python wheel using uv and output the wheel path for downstream workflows
2
2
  name: "Build Python Wheel"
3
3
  on:
4
- push:
5
- branches:
6
- - chore/rewrite
7
4
  pull_request:
8
5
 
9
6
  jobs:
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.3.3"
3
+ }
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.3](https://github.com/b-long/opentdf-python-sdk/compare/otdf-python-v0.3.2...otdf-python-v0.3.3) (2025-09-17)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * improve docs ([#106](https://github.com/b-long/opentdf-python-sdk/issues/106)) ([49aa4ae](https://github.com/b-long/opentdf-python-sdk/commit/49aa4aea5e576c20b3e26c852331de8b0469742f))
9
+
3
10
  ## [0.3.2](https://github.com/b-long/opentdf-python-sdk/compare/otdf-python-v0.3.1...otdf-python-v0.3.2) (2025-09-12)
4
11
 
5
12
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: otdf-python
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Unofficial OpenTDF SDK for Python
5
5
  Author-email: b-long <b-long@users.noreply.github.com>
6
6
  License-File: LICENSE
@@ -102,8 +102,6 @@ with open("encrypted.tdf", "wb") as f:
102
102
  ### Decrypt Data
103
103
 
104
104
  ```python
105
- from otdf_python.tdf import TDFReaderConfig
106
-
107
105
  # Read encrypted TDF file
108
106
  with open("encrypted.tdf", "rb") as f:
109
107
  encrypted_data = f.read()
@@ -83,8 +83,6 @@ with open("encrypted.tdf", "wb") as f:
83
83
  ### Decrypt Data
84
84
 
85
85
  ```python
86
- from otdf_python.tdf import TDFReaderConfig
87
-
88
86
  # Read encrypted TDF file
89
87
  with open("encrypted.tdf", "rb") as f:
90
88
  encrypted_data = f.read()
@@ -0,0 +1,156 @@
1
+ # Connect RPC in OpenTDF Python SDK
2
+
3
+ This document describes the Connect RPC implementation in the OpenTDF Python SDK, which provides a modern HTTP-friendly alternative to traditional gRPC.
4
+
5
+ ## Overview
6
+
7
+ Connect RPC is a protocol that brings the benefits of RPC to HTTP APIs. It's designed to be:
8
+ - **HTTP-compatible**: Works with standard HTTP infrastructure
9
+ - **Type-safe**: Generated from Protocol Buffer definitions
10
+ - **Efficient**: Binary protocol with JSON fallback
11
+ - **Simple**: Easy to debug and integrate
12
+
13
+ ## Architecture
14
+
15
+ The SDK uses a two-module structure for protocol buffer generation:
16
+
17
+ - **Main SDK**: `src/otdf_python/` - Core SDK functionality
18
+ - **Protocol Generation**: `otdf-python-proto/` - Generated Connect RPC and protobuf files
19
+
20
+ ### Generated Files
21
+
22
+ Connect RPC generates the following files in `otdf-python-proto/src/otdf_python_proto/`:
23
+
24
+ - `*_connect.py` - Connect RPC client implementations (recommended)
25
+ - `*_pb2.py` - Protocol buffer message definitions
26
+ - `legacy_grpc/*_pb2_grpc.py` - Traditional gRPC clients (backward compatibility)
27
+
28
+ ## Usage
29
+
30
+ ### Client Creation
31
+
32
+ Connect RPC clients are created using the generated `*_connect.py` modules:
33
+
34
+ ```python
35
+ from otdf_python_proto.kas import kas_connect
36
+ from otdf_python_proto.policy import policy_connect
37
+
38
+ # Create Connect RPC clients
39
+ kas_client = kas_connect.KeyAccessServiceClient(base_url="https://example.com")
40
+ policy_client = policy_connect.PolicyServiceClient(base_url="https://your-policy-endpoint")
41
+ ```
42
+
43
+ ### Authentication
44
+
45
+ Connect RPC clients support standard HTTP authentication:
46
+
47
+ ```python
48
+ import httpx
49
+
50
+ # Create authenticated HTTP client, assuming `token` holds your auth token
51
+ http_client = httpx.Client(
52
+ headers={"Authorization": f"Bearer {token}"}
53
+ )
54
+
55
+ # Use with Connect RPC client
56
+ kas_client = kas_connect.KeyAccessServiceClient(
57
+ base_url="https://example.com",
58
+ http_client=http_client
59
+ )
60
+ ```
61
+
62
+ ## Regenerating Connect RPC Files
63
+
64
+ To regenerate the Connect RPC and protobuf files:
65
+
66
+ ```bash
67
+ cd otdf-python-proto
68
+ uv run python scripts/generate_connect_proto.py
69
+ ```
70
+
71
+ ### Download Fresh Proto Files
72
+
73
+ To download the latest protocol definitions:
74
+
75
+ ```bash
76
+ cd otdf-python-proto
77
+ uv run python scripts/generate_connect_proto.py --download
78
+ ```
79
+
80
+ ### Requirements
81
+
82
+ - `buf` tool: `brew install bufbuild/buf/buf` (or see [official installation guide](https://buf.build/docs/installation))
83
+ - Python dependencies managed by `uv`
84
+
85
+ ## Benefits Over gRPC
86
+
87
+ 1. **HTTP Compatibility**: Works with load balancers, proxies, and other HTTP infrastructure
88
+ 2. **Debugging**: Easy to inspect with standard HTTP tools
89
+ 3. **Flexibility**: Supports both binary and JSON encoding
90
+ 4. **Simplicity**: No special HTTP/2 requirements
91
+
92
+ ## Migration from gRPC
93
+
94
+ If migrating from legacy gRPC clients:
95
+
96
+ 1. Replace `*_pb2_grpc.py` imports with `*_connect.py`
97
+ 2. Update client instantiation to use base URLs instead of channels
98
+ 3. Leverage HTTP client features for authentication and configuration
99
+
100
+ ## Testing
101
+
102
+ Connect RPC clients can be easily mocked and tested using standard HTTP testing tools:
103
+
104
+ ```python
105
+ import httpx
106
+ import respx
107
+ from otdf_python_proto.kas import kas_pb2, kas_connect
108
+
109
+ @respx.mock
110
+ def test_connect_rpc_client():
111
+ # 1. Create a sample protobuf response message
112
+ expected_response = kas_pb2.RewrapResponse(
113
+ entity_wrapped_key=b'some-unwrapped-key'
114
+ )
115
+
116
+ # 2. Mock the correct Connect RPC endpoint URL
117
+ respx.post("https://example.com/kas.AccessService/Rewrap").mock(
118
+ return_value=httpx.Response(
119
+ 200,
120
+ # 3. Return the serialized protobuf message as content
121
+ content=expected_response.SerializeToString(),
122
+ headers={'Content-Type': 'application/proto'}
123
+ )
124
+ )
125
+
126
+ client = kas_connect.KeyAccessServiceClient(base_url="https://example.com")
127
+ # Test client calls...
128
+ ```
129
+
130
+ ## Error Handling
131
+
132
+ Connect RPC provides structured error handling through standard HTTP status codes and error details:
133
+
134
+ ```python
135
+ from connectrpc import ConnectError
136
+
137
+ try:
138
+ # Assuming `kas_client` and `request` are defined as in previous examples
139
+ response = kas_client.rewrap(request)
140
+ except ConnectError as e:
141
+ print(f"Connect RPC error: {e.code} - {e.message}")
142
+ # Handle specific error types
143
+ ```
144
+
145
+ ## Performance Considerations
146
+
147
+ - Use connection pooling with `httpx.Client` for better performance
148
+ - Configure appropriate timeouts for your use case
149
+ - Consider using binary encoding for high-throughput scenarios
150
+
151
+ ## Additional Resources
152
+
153
+ For more information, see:
154
+ - [Connect RPC Documentation](https://connectrpc.com/docs/)
155
+ - [Connect Python Repository](https://github.com/connectrpc/connect-python)
156
+ - [OpenTDF Platform](https://github.com/opentdf/platform)
@@ -12,7 +12,7 @@ This project now supports **Connect RPC**, a modern HTTP-friendly alternative to
12
12
  - 🚀 **Simplified deployment** - No special gRPC infrastructure required
13
13
  - 📊 **Better observability** - Standard HTTP status codes and headers
14
14
 
15
- See [CONNECT_RPC_MIGRATION.md](../CONNECT_RPC_MIGRATION.md) for migration guide and examples.
15
+ See [CONNECT_RPC.md](../docs/CONNECT_RPC.md) for additional information.
16
16
 
17
17
  ## Structure
18
18
 
@@ -158,7 +158,7 @@ response = client.GetPolicy(request)
158
158
 
159
159
  If you're migrating from traditional gRPC clients to Connect RPC:
160
160
 
161
- 1. Read the [Connect RPC Migration Guide](../CONNECT_RPC_MIGRATION.md)
161
+ 1. Read the [Connect RPC Migration Guide](../docs/CONNECT_RPC.md)
162
162
  2. Run the Connect RPC generation: `./scripts/build_connect_proto.sh` (or from the submodule: `cd otdf-python-proto && uv run python scripts/generate_connect_proto.py`)
163
163
  3. Update your client code to use `*_connect.py` modules
164
164
  4. Test with your authentication and deployment setup
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "otdf-python-proto"
3
- version = "0.3.2"
3
+ version = "0.3.3"
4
4
  description = "Generated protobuf files for OpenTDF Python SDK"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -87,7 +87,7 @@ if [[ $? -eq 0 ]]; then
87
87
  echo " python examples/connect_rpc_client_example.py"
88
88
  echo ""
89
89
  echo "For more information, see:"
90
- echo " - CONNECT_RPC_MIGRATION.md"
90
+ echo " - docs/CONNECT_RPC.md"
91
91
  echo " - https://connectrpc.com/docs/"
92
92
  else
93
93
  echo "✗ Connect RPC generation failed!"
@@ -481,7 +481,7 @@ wheels = [
481
481
 
482
482
  [[package]]
483
483
  name = "otdf-python-proto"
484
- version = "0.3.2"
484
+ version = "0.3.3"
485
485
  source = { editable = "." }
486
486
  dependencies = [
487
487
  { name = "connect-python", extra = ["compiler"] },
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "otdf-python"
3
- version = "0.3.2"
3
+ version = "0.3.3"
4
4
  description = "Unofficial OpenTDF SDK for Python"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -686,7 +686,7 @@ wheels = [
686
686
 
687
687
  [[package]]
688
688
  name = "otdf-python"
689
- version = "0.3.2"
689
+ version = "0.3.3"
690
690
  source = { editable = "." }
691
691
  dependencies = [
692
692
  { name = "connect-python", extra = ["compiler"] },
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.3.2"
3
- }
@@ -1,283 +0,0 @@
1
- # Connect RPC Migration Guide
2
-
3
- This document explains how to migrate from traditional gRPC clients to Connect RPC clients in the OpenTDF Python SDK.
4
-
5
- ## What is Connect RPC?
6
-
7
- Connect RPC is a modern, HTTP-friendly alternative to gRPC that provides:
8
-
9
- - **HTTP/1.1 compatibility** - Works with all HTTP infrastructure
10
- - **Human-readable debugging** - JSON payloads can be inspected with standard tools
11
- - **Browser compatibility** - Can be called directly from web browsers
12
- - **Simplified deployment** - No special gRPC infrastructure required
13
- - **Better observability** - Standard HTTP status codes and headers
14
-
15
- For more information, see the [Connect RPC Protocol Documentation](https://connectrpc.com/docs/protocol/).
16
-
17
- ## Dependencies
18
-
19
- The project now includes both Connect RPC and legacy gRPC dependencies:
20
-
21
- ```toml
22
- dependencies = [
23
- "connect-python>=0.4.2", # Connect RPC client
24
- "grpcio>=1.74.0", # Legacy gRPC (backward compatibility)
25
- "grpcio-tools>=1.74.0", # Legacy gRPC tools
26
- # ... other dependencies
27
- ]
28
- ```
29
-
30
- ## Code Generation
31
-
32
- ### Connect RPC Generation (Recommended)
33
-
34
- Use the new Connect RPC generation script:
35
-
36
- ```bash
37
- cd proto-gen
38
- uv run python scripts/generate_connect_proto.py
39
- ```
40
-
41
- This generates:
42
- - `*_connect.py` - Connect RPC clients (preferred)
43
- - `*_pb2.py` - Standard protobuf classes
44
- - `*_pb2.pyi` - Type stubs
45
- - `legacy_grpc/*_pb2_grpc.py` - Legacy gRPC clients (backward compatibility)
46
-
47
- ### Legacy gRPC Generation
48
-
49
- The old script still works for backward compatibility:
50
-
51
- ```bash
52
- cd proto-gen
53
- uv run python scripts/generate_proto.py
54
- ```
55
-
56
- ## Client Usage Examples
57
-
58
- ### Connect RPC Client (Recommended)
59
-
60
- ```python
61
- import urllib3
62
- from otdf_python_proto.policy_pb2 import GetPolicyRequest
63
- from otdf_python_proto.policy_connect import PolicyServiceClient
64
-
65
- # Create HTTP client
66
- http_client = urllib3.PoolManager()
67
-
68
- # Create Connect RPC client
69
- policy_client = PolicyServiceClient(
70
- base_url="https://platform.opentdf.io",
71
- http_client=http_client
72
- )
73
-
74
- # Make unary RPC call
75
- request = GetPolicyRequest(id="policy-123")
76
- response = policy_client.get_policy(request)
77
- print(f"Policy: {response}")
78
-
79
- # With extra headers and timeout
80
- response = policy_client.get_policy(
81
- request,
82
- extra_headers={"Authorization": "Bearer your-token"},
83
- timeout_seconds=30.0
84
- )
85
- ```
86
-
87
- ### Async Connect RPC Client
88
-
89
- ```python
90
- import aiohttp
91
- from otdf_python_proto.policy_pb2 import ListPoliciesRequest
92
- from otdf_python_proto.policy_connect import AsyncPolicyServiceClient
93
-
94
- async def main():
95
- async with aiohttp.ClientSession() as http_client:
96
- policy_client = AsyncPolicyServiceClient(
97
- base_url="https://platform.opentdf.io",
98
- http_client=http_client
99
- )
100
-
101
- # Make async RPC call
102
- request = ListPoliciesRequest()
103
- response = await policy_client.list_policies(request)
104
- print(f"Policies: {response}")
105
-
106
- # Server streaming example
107
- async for policy in policy_client.stream_policies(request):
108
- print(f"Streaming policy: {policy}")
109
- ```
110
-
111
- ### Legacy gRPC Client (Backward Compatibility)
112
-
113
- ```python
114
- import grpc
115
- from otdf_python_proto.policy_pb2 import GetPolicyRequest
116
- from otdf_python_proto.legacy_grpc.policy_pb2_grpc import PolicyServiceStub
117
-
118
- # Create gRPC channel
119
- channel = grpc.insecure_channel("platform.opentdf.io:443")
120
- policy_client = PolicyServiceStub(channel)
121
-
122
- # Make RPC call
123
- request = GetPolicyRequest(id="policy-123")
124
- response = policy_client.GetPolicy(request)
125
- print(f"Policy: {response}")
126
- ```
127
-
128
- ## Error Handling
129
-
130
- ### Connect RPC Error Handling
131
-
132
- ```python
133
- from connectrpc.errors import ConnectError
134
-
135
- try:
136
- response = policy_client.get_policy(request)
137
- except ConnectError as e:
138
- print(f"Connect error: {e.code} - {e.message}")
139
- # e.code can be: "not_found", "permission_denied", etc.
140
- # Full list: https://connectrpc.com/docs/protocol/#error-codes
141
- ```
142
-
143
- ### gRPC Error Handling
144
-
145
- ```python
146
- import grpc
147
-
148
- try:
149
- response = policy_client.GetPolicy(request)
150
- except grpc.RpcError as e:
151
- print(f"gRPC error: {e.code()} - {e.details()}")
152
- ```
153
-
154
- ## Protocol Differences
155
-
156
- | Feature | Connect RPC | gRPC |
157
- |---------|-------------|------|
158
- | Transport | HTTP/1.1, HTTP/2 | HTTP/2 only |
159
- | Payload | JSON or Binary | Binary only |
160
- | Status Codes | HTTP status codes | gRPC status codes |
161
- | Headers | Standard HTTP headers | Custom gRPC headers |
162
- | Browser Support | ✅ Yes | ❌ No (requires gRPC-Web) |
163
- | Debugging | ✅ Human-readable | ❌ Binary format |
164
- | Infrastructure | ✅ Standard HTTP | ❌ Requires gRPC support |
165
-
166
- ## Migration Checklist
167
-
168
- - [ ] Update dependencies to include `connect-python`
169
- - [ ] Regenerate proto files with Connect RPC support
170
- - [ ] Update client code to use Connect RPC clients
171
- - [ ] Update error handling for Connect error types
172
- - [ ] Test with your authentication/authorization setup
173
- - [ ] Update deployment configuration (if needed)
174
- - [ ] Remove legacy gRPC dependencies (optional)
175
-
176
- ## Advanced Usage
177
-
178
- ### Custom HTTP Configuration
179
-
180
- ```python
181
- import urllib3
182
-
183
- # Configure HTTP client with custom settings
184
- http_client = urllib3.PoolManager(
185
- timeout=urllib3.Timeout(connect=10.0, read=30.0),
186
- retries=urllib3.Retry(total=3, backoff_factor=0.3),
187
- headers={"User-Agent": "MyApp/1.0"}
188
- )
189
-
190
- policy_client = PolicyServiceClient(
191
- base_url="https://platform.opentdf.io",
192
- http_client=http_client
193
- )
194
- ```
195
-
196
- ### Low-level API Access
197
-
198
- ```python
199
- # Access response metadata
200
- output = policy_client.call_get_policy(request)
201
- response = output.message()
202
- headers = output.response_headers()
203
- trailers = output.response_trailers()
204
-
205
- if output.error():
206
- raise output.error()
207
- ```
208
-
209
- ### Server Streaming
210
-
211
- ```python
212
- # Server streaming RPC
213
- request = StreamPoliciesRequest()
214
- for policy in policy_client.stream_policies(request):
215
- print(f"Received policy: {policy.id}")
216
-
217
- # With error handling
218
- try:
219
- for policy in policy_client.stream_policies(request):
220
- process_policy(policy)
221
- except ConnectError as e:
222
- print(f"Stream error: {e.code} - {e.message}")
223
- ```
224
-
225
- ## Troubleshooting
226
-
227
- ### Common Issues
228
-
229
- 1. **"buf command not found"**
230
- ```bash
231
- # Install buf
232
- brew install bufbuild/buf/buf
233
- # Or
234
- go install github.com/bufbuild/buf/cmd/buf@latest
235
- ```
236
-
237
- 2. **"protoc-gen-connect_python not found"**
238
- ```bash
239
- # Install with compiler support
240
- uv add connect-python[compiler]
241
- ```
242
-
243
- 3. **Import errors after generation**
244
- ```bash
245
- # Ensure __init__.py files exist
246
- find proto-gen/generated -type d -exec touch {}/__init__.py \;
247
- ```
248
-
249
- 4. **HTTP/2 server issues**
250
- - Connect RPC works with HTTP/1.1, so this is rarely an issue
251
- - If using streaming, ensure your server supports Connect protocol
252
-
253
- ### Debug HTTP Traffic
254
-
255
- ```python
256
- import logging
257
-
258
- # Enable HTTP debug logging
259
- logging.basicConfig(level=logging.DEBUG)
260
- urllib3.disable_warnings()
261
-
262
- # You can now see all HTTP requests/responses
263
- ```
264
-
265
- ## Performance Considerations
266
-
267
- - **HTTP/1.1**: Good for most use cases, supports connection pooling
268
- - **JSON vs Binary**: Binary protobuf is more efficient, JSON is more debuggable
269
- - **Connection Reuse**: Reuse `urllib3.PoolManager` instances across calls
270
- - **Async**: Use async clients for high-concurrency applications
271
-
272
- ## Next Steps
273
-
274
- 1. **Start with unary RPCs**: Easiest to migrate and test
275
- 2. **Test authentication**: Ensure your auth tokens work with HTTP headers
276
- 3. **Migrate streaming RPCs**: More complex but follow similar patterns
277
- 4. **Remove gRPC dependencies**: Once fully migrated, clean up dependencies
278
- 5. **Update documentation**: Update your team's documentation and examples
279
-
280
- For more information, see:
281
- - [Connect RPC Documentation](https://connectrpc.com/docs/)
282
- - [Connect Python Repository](https://github.com/connectrpc/connect-python)
283
- - [OpenTDF Platform](https://github.com/opentdf/platform)