diff --git a/python-pyo3/pyproject.toml b/python-pyo3/pyproject.toml index c2508a90..e0ff9397 100644 --- a/python-pyo3/pyproject.toml +++ b/python-pyo3/pyproject.toml @@ -30,8 +30,8 @@ classifiers = [ dependencies = [] [project.optional-dependencies] -build = ["maturin", "twine", "wheel"] -dev = ["ruff"] +build = ["maturin", "wheel"] +dev = ["maturin", "ruff"] [project.urls] Repository = "https://github.com/NitorCreations/vault" diff --git a/python-pyo3/python/n_vault/vault.py b/python-pyo3/python/n_vault/vault.py index 6a3ce09b..f2cad208 100644 --- a/python-pyo3/python/n_vault/vault.py +++ b/python-pyo3/python/n_vault/vault.py @@ -16,7 +16,7 @@ from collections.abc import Collection from dataclasses import dataclass -from typing import Optional +from typing import Optional, Union from n_vault import nitor_vault_rs @@ -128,7 +128,7 @@ def direct_decrypt(self, data: bytes) -> bytes: profile=self.profile, ) - def direct_encrypt(self, data: bytes | str) -> bytes: + def direct_encrypt(self, data: Union[bytes, str]) -> bytes: """ Encrypt data with KMS. """ @@ -161,7 +161,7 @@ def exists(self, name: str) -> bool: profile=self.profile, ) - def init(self) -> StackCreated | CloudFormationStackData: + def init(self) -> Union[StackCreated, CloudFormationStackData]: """ Initialize new Vault stack. @@ -230,7 +230,7 @@ def stack_status(self) -> CloudFormationStackData: ) return CloudFormationStackData(**data) - def store(self, name: str, data: bytes | str) -> None: + def store(self, name: str, data: Union[bytes, str]) -> None: """ Store encrypted value with given key name in S3. """ @@ -248,7 +248,7 @@ def store(self, name: str, data: bytes | str) -> None: profile=self.profile, ) - def update(self) -> StackUpdated | CloudFormationStackData: + def update(self) -> Union[StackUpdated, CloudFormationStackData]: """ Update the vault Cloudformation stack with the current template.