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(
identity=Identity(type="NONE"),
authorizer=HostedAuthorizer(
api_key=ASERTO_API_KEY,
tenant_id=ASERTO_TENANT_ID,
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
Release history Release notifications | RSS feed
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.2.2.tar.gz
(7.6 kB
view details)
Built Distribution
File details
Details for the file aserto-0.2.2.tar.gz
.
File metadata
- Download URL: aserto-0.2.2.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.8 CPython/3.9.9 Darwin/21.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af958f5543ba48dd42457816add1a0a338d6405090aba364e7828487715b1df7 |
|
MD5 | 77841d9eb68c1c8d3e9536d3366ad6c8 |
|
BLAKE2b-256 | 494abadc4e957eec64d6a0553d16c50256f10c0e7f42e45082fb8f838c1f88e7 |
File details
Details for the file aserto-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: aserto-0.2.2-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.8 CPython/3.9.9 Darwin/21.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 464acb926010727793171e662a5af1b78c3e745e0e9aa62bb13671a7bc213f01 |
|
MD5 | 2e871e815ef256e26b88ac9f49fc0783 |
|
BLAKE2b-256 | f75d06e88289885ba2cbf5ea8b87101861da4ecc587eababdb10977af1e62f9a |