Skip to main content

Aserto API client

Project description

Aserto API client

High-level client interface to Aserto's APIs.

At the moment this only supports interacting with Aserto's Authorizer service.

Installation

Using Pip

pip install aserto

Using Poetry

poetry add aserto

Usage

from aserto import HostedAuthorizer, Identity
from aserto.api.authorizer import AuthorizerClient


client = AuthorizerClient(
    tenant_id=ASERTO_TENANT_ID,
    identity=Identity(type="NONE"),
    authorizer=HostedAuthorizer(api_key=ASERTO_API_KEY, service_type="gRPC"),
)

result = await client.decision_tree(
    decisions=["visible", "enabled", "allowed"],
    policy_id=ASERTO_POLICY_ID,
    policy_path_root=ASERTO_POLICY_PATH_ROOT,
    policy_path_separator="DOT",
)

assert result == {
    "GET.your.policy.path": {
        "visible": True,
        "enabled": True,
        "allowed": False,
    },
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aserto-0.1.3.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

aserto-0.1.3-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file aserto-0.1.3.tar.gz.

File metadata

  • Download URL: aserto-0.1.3.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.7.11 Darwin/20.3.0

File hashes

Hashes for aserto-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7370e9ff975ca606e246c5fba038d1c36eb263234edbb0de33a6546ed90f8bff
MD5 bc9a3dd6accacf0326e34198a4a72a72
BLAKE2b-256 6d3b51c71665a1587803738f6750be8169e0dab81fd8652240efe3a005afdae8

See more details on using hashes here.

File details

Details for the file aserto-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: aserto-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.7.11 Darwin/20.3.0

File hashes

Hashes for aserto-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a719f27e79da94238687b8e43ad55f4174a69e6a89c5067aaac86660a1edd26b
MD5 05579b6b33b64191af3948acd18df812
BLAKE2b-256 2091240e47069b4016e4012c1349780ed41c78c403505f71ff6eb7a984ce863f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page