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.4.tar.gz (45.0 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.4-py3-none-any.whl (70.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for agntcy_identity_service_sdk-0.0.4.tar.gz
Algorithm Hash digest
SHA256 1cc10e6769b8b9454cc52a64ddd08c30ae0ce8bc5cf25cf6699509e955c1a4e1
MD5 94706afc4d63e1b6ff77413f1f3927e5
BLAKE2b-256 858955a7d5c214eb8226773be445247811bbe4aebea83b10924045f3bdbcc2ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agntcy_identity_service_sdk-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 51dbc04d3496de1f7488a10c4ea85cf83545a1bb83ea884b198ad4c682b31892
MD5 4c230ac30798d413012a7703de37ffaa
BLAKE2b-256 8c9fee7bc6be29bfa270a2303c9faf1f98bef2589a230dcdfa726721f7071297

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