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
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.3.0rc2.tar.gz
(7.8 kB
view details)
Built Distribution
aserto-0.3.0rc2-py3-none-any.whl
(10.2 kB
view details)
File details
Details for the file aserto-0.3.0rc2.tar.gz
.
File metadata
- Download URL: aserto-0.3.0rc2.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.7.12 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f244179735010738d61fc8bb065cfe3ed021670ab5a70bad454412c77ecc0010 |
|
MD5 | a311490cb5f33cbd3c0633afe6ba338f |
|
BLAKE2b-256 | a74beb93516cfabdcaf89fe1b62c42e171839673cffb500952adf8117c1a7990 |
File details
Details for the file aserto-0.3.0rc2-py3-none-any.whl
.
File metadata
- Download URL: aserto-0.3.0rc2-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 094eed91f03d1b0c3791e93d3e58961c667151e338f744aeca89e406f24e9dad |
|
MD5 | 4fd1ae54eec6331da77c55e629349269 |
|
BLAKE2b-256 | 8e029a878349514d675e4ffdcd964379c8ad16f9ab0f45a520feb0c6b2e3eece |