Skip to content

Commit

Permalink
Merge pull request #71 from permitio/maya/per-9703-add-pdp-api-to-syn…
Browse files Browse the repository at this point in the history
…c-client-in-python-sdk

Add pdp api to sync client in python sdk
  • Loading branch information
maya-barak authored Apr 16, 2024
2 parents d8a15f5 + 0b9dc23 commit 69edb69
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions permit/pdp_api/pdp_api_client.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from permit.utils.sync import SyncClass

from ..config import PermitConfig
from .role_assignments import RoleAssignmentsApi

Expand All @@ -22,3 +24,7 @@ def __init__(self, config: PermitConfig):
@property
def role_assignments(self) -> RoleAssignmentsApi:
return self._role_assignments


class SyncPDPApi(PermitPdpApiClient, metaclass=SyncClass):
pass
2 changes: 2 additions & 0 deletions permit/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from .api.sync_api_client import SyncPermitApiClient
from .config import PermitConfig
from .enforcement.enforcer import Action, CheckQuery, Resource, SyncEnforcer, User
from .pdp_api.pdp_api_client import SyncPDPApi
from .permit import Permit as AsyncPermit
from .utils.context import Context

Expand All @@ -14,6 +15,7 @@ def __init__(self, config: Optional[PermitConfig] = None, **options):
self._enforcer = SyncEnforcer(self._config)
self._api = SyncPermitApiClient(self._config)
self._elements = SyncElementsApi(self._config)
self._pdp_api = SyncPDPApi(self._config)

@property
def api(self) -> SyncPermitApiClient:
Expand Down

0 comments on commit 69edb69

Please sign in to comment.