Skip to main content

gRPC client for Aserto Directory service instances

Project description

Aserto Directory gRPC client

This is an automatically generated client for interacting with Aserto's Directory service using the gRPC protocol.

Installation

Using Pip

pip install aserto-directory

Using Poetry

poetry add aserto-directory

Usage

import grpc
from aserto.directory.reader.v2 import ReaderStub, GetObjectTypesRequest

with grpc.secure_channel(
    target="directory.prod.aserto.com:8443",
    credentials=grpc.ssl_channel_credentials(),
) as channel:
    reader = ReaderStub(channel)

    # List all object types in the directory
    response = reader.GetObjectTypes(
        GetObjectTypesRequest(),
        metadata=(
            ("authorization", f"basic {ASERTO_DIRECTORY_API_KEY}"),
            ("aserto-tenant-id", ASERTO_TENANT_ID),
        ),
    )

    for object_type in response.results:
        print("Object Type:", object_type.name)

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_directory-0.31.3.tar.gz (73.1 kB view hashes)

Uploaded Source

Built Distribution

aserto_directory-0.31.3-py3-none-any.whl (127.7 kB view hashes)

Uploaded Python 3

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