Skip to main content

A Python SDK for AI agents to securely generate and verify 'hello' authentication messages, enabling seamless interaction between AI agents and AI-centric services.

Project description

Hello-Message Python SDK

The Hello-Message Python SDK provides a simple interface for generating and verifying "hello" authentication messages for AI-to-AI and AI-to-AI-first services. This SDK is designed to work by using cryptographic signatures for secure authentication.


Installation

Install the SDK from PyPI using pip:

pip install hello-message-sdk

Features

  • Generate Hello Messages: Create signed "hello" messages using Ethereum private keys.
  • Verify Signatures: Validate the authenticity of signed "hello" messages.

Quick Start

Generate a "Hello" Message

from hello_message import Hello

# Initialize the Hello SDK with a private key
private_key = "<your_ethereum_private_key>"
hello = Hello(private_key=private_key)

# Get the Ethereum address
address = hello.get_address()
print("Address:", address)

# Generate a signed "hello" message
signature = hello.get_signature()
print("Signature:", signature)

Verify a "Hello" Message

from hello_message import Hello

# Example signature and address
signature = "<signature_from_hello_message>"
address = "<ethereum_address>"

# Verify the signature
is_valid = Hello.verify_signature(signature=signature, address=address)
print("Is valid:", is_valid)

API Reference

Class: Hello

Hello(private_key: str)

Initialize the Hello object with an Ethereum private key.

  • private_key: Ethereum private key (string) used for signing messages.

get_address() -> str

Get the Ethereum address corresponding to the private key.

get_signature() -> str

Generate a signed "hello" message.

verify_signature(signature: str, address: str) -> bool

Verify the authenticity of a "hello" message signature.

  • signature: The signed "hello" message (string).
  • address: The Ethereum address expected to have signed the message (string).

Returns:

  • True if the signature is valid.
  • False otherwise.

Testing

Run the tests using pytest:

pytest tests/

Contributing

We welcome contributions from the community! To get started:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Submit a pull request with a detailed description of your changes.

Please read our Contributing Guidelines for more information.


License

This project is licensed under the MIT License. See the LICENSE file for details.


Support


Happy coding with Hello-Message Python SDK!

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

hello_message_sdk-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

hello_message_sdk-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file hello_message_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: hello_message_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for hello_message_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b0c2419a3b3483e793ba08bb3eb2d37cd48b6f8909c8046b8f46c5071d72a722
MD5 8f852b4b32983a71a6005ed1a64efae1
BLAKE2b-256 9fb70c32de3725908a95424fd3ae41f62b38b742d2f24729e5fec8284ac42fde

See more details on using hashes here.

Provenance

The following attestation bundles were made for hello_message_sdk-0.1.0.tar.gz:

Publisher: python-publish.yml on aimxlabs/hello-message-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hello_message_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for hello_message_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0b9e46f91b9ef2fbfeff4efa0ac4559795ac0d41528ba7f6cbc2eb037c3a8ba4
MD5 6c9bb7f7fa51419684c54fbaf49b3dcc
BLAKE2b-256 f89b4dc944883eb98a9a51a8757eddc601df8836a58f8210105235e5bc63abfa

See more details on using hashes here.

Provenance

The following attestation bundles were made for hello_message_sdk-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on aimxlabs/hello-message-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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