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.21.0.tar.gz (29.4 kB view details)

Uploaded Source

Built Distribution

aserto_directory-0.21.0-py3-none-any.whl (43.9 kB view details)

Uploaded Python 3

File details

Details for the file aserto-directory-0.21.0.tar.gz.

File metadata

  • Download URL: aserto-directory-0.21.0.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.7.12 Darwin/22.5.0

File hashes

Hashes for aserto-directory-0.21.0.tar.gz
Algorithm Hash digest
SHA256 f8f9e2430502700248c4bde680eeae5854de060280e473a7efe93a2146edcd6a
MD5 4bc34363de5b5f5812cdd6737609919c
BLAKE2b-256 90f71b3b6a1a9f33552c5909cb4f3b4803a096a9aaa2eb48400c1570cd5573ac

See more details on using hashes here.

File details

Details for the file aserto_directory-0.21.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aserto_directory-0.21.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a8068e1a14fff57da2e5701bcb7b5aa4fab98502e6c9f70f9b41aa16b99f736
MD5 5b36a55767752e1bc37bb0130d7f088f
BLAKE2b-256 804422b17bdb548df58ae7d0cc8ba5f33ad38e481a3d971649e17c41600a52ab

See more details on using hashes here.

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