AZTP (Agentic Zero Trust Protocol) Client Library for Python
Project description
AZTP Client Python
AZTP (Agentic Zero Trust Protocol) Client is an enterprise-grade identity service client that provides secure workload identity management using SPIFFE (Secure Production Identity Framework for Everyone) standards. The client library facilitates secure communication between workloads by managing digital identities and certificates.
Installation
pip install aztp-client
Quick Start
from aztp_client import Aztp
# Initialize client
client = Aztp(api_key="your-api-key")
# Create a secure agent
agent = await client.secure_connect(name="service1")
# Verify identity
is_valid = await client.verify_identity(agent)
# Get identity details
identity = await client.get_identity(agent)
Example
import asyncio
import os
from aztp_client import Aztp
from dotenv import load_dotenv
# Load environment variables
load_dotenv()
async def main():
# Initialize the client with your API key
client = Aztp(
api_key=os.getenv("AZTP_API_KEY"),
)
try:
crewAgent = {}
# Create a secure agent
print("\nCreating secure agent...")
agent = await client.secure_connect(crewAgent, name="MyAgent") # you may edit the name to your liking
print(f"Agent created successfully!")
if agent.identity.spiffe_id:
print(f"Agent: {agent.identity.spiffe_id}")
# Verify the identity
print("\nVerifying identity...")
is_valid = await agent.verify()
print(f"Identity valid: {is_valid}")
# Get identity details
print("\nGetting identity details...")
identity = await client.get_identity(agent)
if identity:
print(f"Retrieved identity: {identity}")
else:
print("No identity found")
except ConnectionError as e:
print(f"Connection Error: Could not connect to the AZTP server. Please check your connection and server URL.")
print(f"Details: {e}")
except Exception as e:
print(f"Error: {str(e)}")
print("\nCurrent configuration:")
print(f"Base URL: {client.config.base_url}")
print(f"Environment: {client.config.environment}")
print("API Key: ********") # Don't print the API key for security
if __name__ == "__main__":
asyncio.run(main())
Features
- Workload Identity Management using SPIFFE standards
- Certificate Management (X.509)
- Secure Communication
- Identity Verification
- Metadata Management
- Environment-specific Configuration
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aztp_client-1.0.1.tar.gz.
File metadata
- Download URL: aztp_client-1.0.1.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ff528edf03b4ea522b9965d265399a7df88ac07f130ba36ddbe48b310ad75a3
|
|
| MD5 |
09ab92d56b305adfe3adb542b80c4d76
|
|
| BLAKE2b-256 |
4eef0a3c3a5696e9dc81c36293e9101c79a9872c8c78721c0ba0bb8842ad642a
|
File details
Details for the file aztp_client-1.0.1-py3-none-any.whl.
File metadata
- Download URL: aztp_client-1.0.1-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e96a0a06b7fb17c2585d8880f3570ced079f5a349468062e0b9b847ec9d0ee53
|
|
| MD5 |
aa52c83ca17c5f468f006cc064dc4aef
|
|
| BLAKE2b-256 |
9a84bc508f50922128f10f7ae0fd576f19c30e04539f1c9e4cc7c609eb703b0b
|