aserto-0.3.0rc3
توضیحات
Aserto API client
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | aserto-0.3.0rc3 |
| نام | aserto |
| نسخه کتابخانه | 0.3.0rc3 |
| نگهدارنده | ['authereal'] |
| ایمیل نگهدارنده | ['authereal@aserto.com'] |
| نویسنده | Aserto, Inc. |
| ایمیل نویسنده | pypi@aserto.com |
| آدرس صفحه اصلی | https://github.com/aserto-dev/aserto-python/tree/HEAD/packages/aserto |
| آدرس اینترنتی | https://pypi.org/project/aserto/ |
| مجوز | Apache-2.0 |
# Aserto API client
High-level client interface to Aserto's APIs.
At the moment this only supports interacting with Aserto's [Authorizer service](https://docs.aserto.com/docs/authorizer-guide/overview).
## Installation
### Using Pip
```sh
pip install aserto
```
### Using Poetry
```sh
poetry add aserto
```
## Usage
```py
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_instance_name=ASERTO_POLICY_INSTANCE_NAME,
policy_instance_label=ASERTO_POLICY_INSTANCE_LABEL,
policy_path_root=ASERTO_POLICY_PATH_ROOT,
policy_path_separator="DOT",
)
assert result == {
"GET.your.policy.path": {
"visible": True,
"enabled": True,
"allowed": False,
},
}
```
نیازمندی
| مقدار | نام |
|---|---|
| >=3.8.1,<4.0.0 | aiohttp |
| >=3.10.0,<4.0.0 | typing-extensions |
| >=1.49.1,<2.0.0 | grpcio |
| >=4.21.7,<5.0.0 | protobuf |
| ==0.20.0 | aserto-authorizer |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7,<4.0 | Python |
نحوه نصب
نصب پکیج whl aserto-0.3.0rc3:
pip install aserto-0.3.0rc3.whl
نصب پکیج tar.gz aserto-0.3.0rc3:
pip install aserto-0.3.0rc3.tar.gz