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.4.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: aserto-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 e696772582665e1e0ebffb4fc9c98a1789814dec61cdda803b92c7662fd9c0ee
MD5 e176495a65e96e29642699d1252e1e90
BLAKE2b-256 326749c2dcc76dcf84bba05c0e2a8431c6d3314094fe020ca089f59f37f95c5b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aserto-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 76484cd53d205ebc78719ad273a4f1dac83eb744f75a6fb5fc21ae1d3a51cdb9
MD5 0c93ddd9b8663aab7e754a89675a90bc
BLAKE2b-256 165ed47025eeb0e60b3013891fa412bec4147563e58d9757da56a20704461845

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