diff --git a/.release-please-config.json b/.release-please-config.json index 7c010ff..f0de658 100644 --- a/.release-please-config.json +++ b/.release-please-config.json @@ -11,12 +11,16 @@ "extra-files": [ "pyproject.toml", "src/otdf_python/cli.py", - "otdf-python-proto/pyproject.toml", { "path": "uv.lock", "type": "toml", "jsonpath": "$.package[?(@.name.value=='otdf-python')].version" }, + { + "path": "otdf-python-proto/pyproject.toml", + "type": "toml", + "jsonpath": "$.project[?(@.name.value=='otdf-python-proto')].version" + }, { "path": "otdf-python-proto/uv.lock", "type": "toml", diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fa58eef..beea3f7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.3.2" + ".": "0.3.1" } diff --git a/README.md b/README.md index 7bd008c..f99c32a 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,10 @@ Unofficial OpenTDF SDK for Python - **Flexible Configuration**: Support for various authentication methods and platform endpoints - **Comprehensive Testing**: Full test suite with unit and integration tests +## Legacy Version + +A legacy version (0.2.x) of this project is available for users who need the previous implementation. For more information, see [LEGACY_VERSION.md](docs/LEGACY_VERSION.md) or visit the [legacy branch on GitHub](https://github.com/b-long/opentdf-python-sdk/tree/0.2.x). + ## Prerequisites This project uses [uv](https://docs.astral.sh/uv/) for dependency management and task running. @@ -172,30 +176,6 @@ with open("decrypted.txt", "wb") as f: sdk.close() ``` -### NanoTDF Support - -```python -from io import BytesIO -from otdf_python.config import NanoTDFConfig - -# Create NanoTDF configuration -config = NanoTDFConfig( - attributes=["https://example.com/attr/classification/value/public"], - ecc_mode="ecdsa" # or "gmac" -) - -# Encrypt to NanoTDF format -input_data = b"Hello, World!" -output_stream = BytesIO() -size = sdk.create_nano_tdf(BytesIO(input_data), output_stream, config) -encrypted_data = output_stream.getvalue() - -# Decrypt NanoTDF -decrypted_stream = BytesIO() -sdk.read_nano_tdf(BytesIO(encrypted_data), decrypted_stream, config) -decrypted_data = decrypted_stream.getvalue() -``` - ## Project Structure ``` diff --git a/docs/LEGACY_VERSION.md b/docs/LEGACY_VERSION.md index c4220cf..3da78a2 100644 --- a/docs/LEGACY_VERSION.md +++ b/docs/LEGACY_VERSION.md @@ -1,6 +1,6 @@ # Legacy Version -The legacy version of this project is available for now using the Github branch: `0.2.x`. +The legacy version of this project is available using the Github branch: `0.2.x`. You can access it directly via the following link: https://github.com/b-long/opentdf-python-sdk/tree/0.2.x diff --git a/otdf-python-proto/pyproject.toml b/otdf-python-proto/pyproject.toml index 69a6318..f120b6e 100644 --- a/otdf-python-proto/pyproject.toml +++ b/otdf-python-proto/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "otdf-python-proto" -version = "0.3.2" +version = "0.3.1" description = "Generated protobuf files for OpenTDF Python SDK" readme = "README.md" authors = [ diff --git a/otdf-python-proto/src/otdf_python_proto/__init__.py b/otdf-python-proto/src/otdf_python_proto/__init__.py index 86c022e..3bfcae0 100644 --- a/otdf-python-proto/src/otdf_python_proto/__init__.py +++ b/otdf-python-proto/src/otdf_python_proto/__init__.py @@ -5,7 +5,7 @@ and other OpenTDF services. """ -__version__ = "0.3.2" +__version__ = "0.3.1" # Import submodules to make them available from . import authorization diff --git a/otdf-python-proto/uv.lock b/otdf-python-proto/uv.lock index e9684c4..179ca3b 100644 --- a/otdf-python-proto/uv.lock +++ b/otdf-python-proto/uv.lock @@ -481,7 +481,7 @@ wheels = [ [[package]] name = "otdf-python-proto" -version = "0.3.2" +version = "0.3.1" source = { editable = "." } dependencies = [ { name = "connect-python", extra = ["compiler"] }, diff --git a/pyproject.toml b/pyproject.toml index b73efbc..d1e5eb4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "otdf-python" -version = "0.3.2" +version = "0.3.1" description = "Unofficial OpenTDF SDK for Python" readme = "README.md" authors = [ diff --git a/src/otdf_python/cli.py b/src/otdf_python/cli.py index 9fecf7d..83873e6 100644 --- a/src/otdf_python/cli.py +++ b/src/otdf_python/cli.py @@ -22,7 +22,7 @@ from otdf_python.tdf import TDFReaderConfig # Version - get from project metadata -__version__ = "0.3.2" +__version__ = "0.3.1" # Set up logging @@ -355,21 +355,8 @@ def cmd_inspect(args): # Validate input file input_path = validate_file_exists(args.file) - # For inspection, try to create authenticated SDK, but allow unauthenticated inspection too try: - try: - sdk = build_sdk(args) - except CLIError as auth_error: - # If authentication fails, create minimal SDK for basic inspection - logger.warning(f"Authentication failed, using minimal SDK: {auth_error}") - builder = SDKBuilder() - if args.platform_url: - builder.set_platform_endpoint(args.platform_url) - if hasattr(args, "plaintext") and args.plaintext: - builder.use_insecure_plaintext_connection(True) - if args.insecure: - builder.use_insecure_skip_verify(True) - sdk = builder.build() + sdk = build_sdk(args) try: # Read encrypted file diff --git a/uv.lock b/uv.lock index 7c3a904..a2c1930 100644 --- a/uv.lock +++ b/uv.lock @@ -686,7 +686,7 @@ wheels = [ [[package]] name = "otdf-python" -version = "0.3.2" +version = "0.3.1" source = { editable = "." } dependencies = [ { name = "connect-python", extra = ["compiler"] },