Skip to main content

Identity SDK for Python

Project description

Python SDK

The Python SDK provides a simple way to verify agent identities using the Identity Platform's RESTful API. It is designed to be easy to use and integrate into 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 agntcy-identity-sdk

Example Usage

To get and verify an agent's badge, you can use the following code snippet:

import os

from agntcyidentity.sdk import IdentitySdk

# Initialize the Identity SDK
identity_sdk = IdentitySdk()

# Get badge by ID
badge = identity_sdk.get_badge("<ID>")
print("Got badge: ", badge)

# Verify badge
verified = identity_sdk.verify_badge(badge)
print("Badge verified: ", verified)

You must set the following environment variables:

  • IDENTITY_NODE_GRPC_SERVER_URL: The URL of the Identity Node gRPC server.

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

  • IDENTITY_NODE_USE_SSL: 0, to disable SSL verification.

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_sdk-0.0.17.tar.gz (24.7 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_sdk-0.0.17-py3-none-any.whl (39.0 kB view details)

Uploaded Python 3

File details

Details for the file agntcy_identity_sdk-0.0.17.tar.gz.

File metadata

  • Download URL: agntcy_identity_sdk-0.0.17.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for agntcy_identity_sdk-0.0.17.tar.gz
Algorithm Hash digest
SHA256 97bb79c2d4efcd17e304fe0e5b1cecf7bfec6227511b4d01f933b36e79ce37a5
MD5 84690cefb03ba5e22e67908ddda4b541
BLAKE2b-256 227800b9d5f584dde8b80cd0cd7387c05b2e0bc75126364703d3b5e12c640815

See more details on using hashes here.

File details

Details for the file agntcy_identity_sdk-0.0.17-py3-none-any.whl.

File metadata

File hashes

Hashes for agntcy_identity_sdk-0.0.17-py3-none-any.whl
Algorithm Hash digest
SHA256 6aa4f6ae773e4af73f865390b8a82a68a69b20a28df13b455c5b98c3ab1bd210
MD5 0aae2ab1a5a888c4ad18125e04359be4
BLAKE2b-256 78b3f5864d61a1efc3214f60332e42e541fdd86d62f48e15b7a800c74ca1fdf2

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