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.common.v2 import ObjectTypeRequest
from aserto.directory.reader.v2 import ReaderStub

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

    # List all object types in the directory
    response = client.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.0.1rc1.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

aserto_directory-0.0.1rc1-py3-none-any.whl (35.0 kB view details)

Uploaded Python 3

File details

Details for the file aserto-directory-0.0.1rc1.tar.gz.

File metadata

  • Download URL: aserto-directory-0.0.1rc1.tar.gz
  • Upload date:
  • Size: 25.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

Hashes for aserto-directory-0.0.1rc1.tar.gz
Algorithm Hash digest
SHA256 ec9c82889366717b9ce5ed6c8b11fe4def849776cf51efe37d9e1e099771ef47
MD5 a611e04711eaa4af95ab7e050d2cbc71
BLAKE2b-256 76cf618bbef90d916aa5fe623fbb34af0cb91dab4dba73696713334d9c106781

See more details on using hashes here.

File details

Details for the file aserto_directory-0.0.1rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for aserto_directory-0.0.1rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 93177c03d2ba05a42fdf7bb683ecf80cf594dc2eb8682ed285f9fc18f3904aa2
MD5 4864efe5ff830f7d514960d4f10e79a9
BLAKE2b-256 3c04b4fc7a69916303ce21decc7e177097619fdacf3200f48dc27250b87fc330

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