Skip to content

Commit

Permalink
Potential fix for python bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHougaard committed Jan 10, 2024
1 parent 5da7121 commit 72f4387
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions crates/infisical-py/infisical_client/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
__version__ = "1.0.1"

from .infisical_client import InfisicalClient as InfisicalClient

from .infisical_py import InfisicalClient as RustInfisicalClient

from .schemas import GetSecretOptions as GetSecretOptions
from .schemas import UpdateSecretOptions as UpdateSecretOptions
from .schemas import DeleteSecretOptions as DeleteSecretOptions
Expand Down
6 changes: 3 additions & 3 deletions crates/infisical-py/infisical_client/infisical_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@

from .schemas import ArbitraryOptions, ResponseForCreateSymmetricKeyResponse

import infisical_py
from .infisical_py import InfisicalClient as RustInfisicalClient
import os

class InfisicalClient:
def __init__(self, settings: ClientSettings = None):

if settings is None:
self.inner = infisical_py.InfisicalClient(None)
self.inner = RustInfisicalClient(None)
else:

settings.user_agent = "infisical-python-sdk"

settings_json = json.dumps(settings.to_dict())

self.inner = infisical_py.InfisicalClient(settings_json)
self.inner = RustInfisicalClient(settings_json)

def _run_command(self, command: Command) -> Any:
response_json = self.inner.run_command(json.dumps(command.to_dict()))
Expand Down
Binary file not shown.

0 comments on commit 72f4387

Please sign in to comment.