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.client import AuthorizerOptions, Identity
from aserto.client.api.authorizer import AuthorizerClient


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

result = await client.decision_tree(
    decisions=["visible", "enabled", "allowed"],
    policy_name=ASERTO_POLICY_NAME,
    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.3.0rc1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

aserto-0.3.0rc1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file aserto-0.3.0rc1.tar.gz.

File metadata

  • Download URL: aserto-0.3.0rc1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.7.12 Darwin/21.6.0

File hashes

Hashes for aserto-0.3.0rc1.tar.gz
Algorithm Hash digest
SHA256 d807d7bf5819917f2365a2472d86f19d5fb3b54263991af3482f510c3f0628a5
MD5 30015b13b914b3ff7c917bfc44d027c7
BLAKE2b-256 c971aff87ca88392bd83fa874fd72971db6b0d1d0e34479a7a0906ee1e81e983

See more details on using hashes here.

File details

Details for the file aserto-0.3.0rc1-py3-none-any.whl.

File metadata

  • Download URL: aserto-0.3.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.7.12 Darwin/21.6.0

File hashes

Hashes for aserto-0.3.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 d90983ea94e5ef674131e4b88ee076f935b41a3506c150f011b1533524e760f6
MD5 a4b317eb3dd78553a8b02c7c1ae535ae
BLAKE2b-256 e831a80ae896b0ca281b5dc6c5d2495ef4e9d64ecc74a3d86a730e142b5c2260

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