https://github.com/aserto-dev/python-directory
Python gRPC bindings for the Aserto directory service.
https://github.com/aserto-dev/python-directory
Last synced: 3 months ago
JSON representation
Python gRPC bindings for the Aserto directory service.
- Host: GitHub
- URL: https://github.com/aserto-dev/python-directory
- Owner: aserto-dev
- License: mit
- Created: 2022-10-23T16:48:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-25T16:42:14.000Z (about 1 year ago)
- Last Synced: 2025-08-31T16:53:34.895Z (10 months ago)
- Language: Python
- Size: 354 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS.md
Awesome Lists containing this project
README
# Aserto Directory gRPC client
This is an automatically generated client for interacting with Aserto's
[Directory service](https://www.topaz.sh/docs/directory) using the gRPC protocol.
The code was generated from https://buf.build/aserto-dev/directory.
## Installation
### Using Pip
```sh
pip install aserto-directory
```
### Using Poetry
```sh
poetry add aserto-directory
```
## Usage
```py
import grpc
from aserto.directory.reader.v3 import ReaderStub, GetObjectRequest
with grpc.secure_channel(
target="directory.prod.aserto.com:8443",
credentials=grpc.ssl_channel_credentials(),
) as channel:
reader = ReaderStub(channel)
# Read an object from the directory.
response = reader.GetObject(
GetObjectRequest(object_type="user", object_id="rick@the-citadel.com"),
metadata=(
("authorization", f"basic {ASERTO_DIRECTORY_API_KEY}"),
("aserto-tenant-id", ASERTO_TENANT_ID),
),
)
print("Object:", object_type.result)