Skip to main content

AGNTCY Identity Service SDK & CLI for Python

Project description

Python SDK

The Python SDK provides:

  • A CLI to interact with local Agentic Services.
  • A SDK to integrate with Agentic Services in your Python applications.

Prerequisites

To use the Python SDK, you need to have the following installed:

Installation

To install the Python SDK, you can use pip:

pip install .

Example Usage

Here is a basic example of how to use the Python SDK to verify a badge for an Agentic Service:

from dotenv import load_dotenv
from identityservice.sdk import IdentityServiceSdk as Sdk

load_dotenv()

identity_sdk = Sdk(
    api_key="{YOUR_ORGANIZATION_API_KEY}"
)

try:
    print(
        "Got badge: ",
        identity_sdk.verify_badge(
           {JOSE_ENVELOPED_BADGE}
        ),
    )
except Exception as e:
    print("Error verifying badge: ", e)

You must set the following environment variables:

  • IDENTITY_SERVICE_GRPC_SERVER_URL: The URL of the Identity Service gRPC server.
  • YOUR_ORGANIZATION_API_KEY: Your organization API key.

[!NOTE] If the node is running locally, you must add the following environment variable:

  • IDENTITY_SERVICE_USE_SSL: 0, to disable SSL verification.

For more examples, see our online Python SDK Documentation.

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

agntcy_identity_service_sdk-0.0.7.tar.gz (44.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agntcy_identity_service_sdk-0.0.7-py3-none-any.whl (70.2 kB view details)

Uploaded Python 3

File details

Details for the file agntcy_identity_service_sdk-0.0.7.tar.gz.

File metadata

File hashes

Hashes for agntcy_identity_service_sdk-0.0.7.tar.gz
Algorithm Hash digest
SHA256 960f62a1641042a61ffa173eb525075bdb246e16e6ace6205ac99e509b60f71d
MD5 a3a961754cc76f8dd6d200951757b53d
BLAKE2b-256 af77e4fb772398742676ba61e3c17a0cf1730dfe11b6d3a54a71b239bc74bdcb

See more details on using hashes here.

File details

Details for the file agntcy_identity_service_sdk-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for agntcy_identity_service_sdk-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d2ba9b30751d3f5962a583c245d83bd44b6e6e61ae8101b1524535c4dc99d4b2
MD5 417ce0c32fa655f233bab79e67564585
BLAKE2b-256 b93f7d0f0fbc21550b8f101c1354dd1251f0ba4c4f2108139b9e4ad6a9516284

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page