Python Client SDK for Luna Free Email API
Project description
Luna Email SDK
Python SDK for the Luna Free Email API. This SDK provides a simple client to send and verify emails through the Luna Email Service.
Installation
You can install the SDK from a local directory or directly from a Git repository.
From local directory:
Navigate to the sdk directory and run:
pip install .
From Git repository:
pip install git+https://github.com/your-username/luna-email-api.git#egg=luna-email-sdk&subdirectory=sdk
(Note: You need to replace your-username with your actual GitHub username)
Usage
Here is a basic example of how to use the LunaEmailClient.
from luna_email import LunaEmailClient
# 1. Initialize the client with your API key
api_key = "luna_live_your_secret_api_key_here" # Replace with your actual key
client = LunaEmailClient(api_key=api_key)
# 2. Send a verification code
service_name = "My Awesome App"
user_email = "test@example.com"
print(f"Sending verification to {user_email}...")
send_result = client.send_verification(email=user_email, service_name=service_name)
print(send_result)
if send_result.get("ok"):
# 3. Verify the code
code = input("Please enter the verification code you received: ")
print("Verifying code...")
verify_result = client.verify_email(email=user_email, code=code)
print(verify_result)
else:
print("Failed to send verification email.")
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 luna_email_sdk-0.1.0.tar.gz.
File metadata
- Download URL: luna_email_sdk-0.1.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01844a32ff0b8ce430b53882d05cbb9b06bd5784bfcc8153c13d7eb5811c7357
|
|
| MD5 |
bafb6072f42bcd6ecfaa8c2e5bf6f7a0
|
|
| BLAKE2b-256 |
03c34c2409bff464df866e60bf272fba8f38cef52f6ab5a9b5e2a5df6e7c8ef1
|
File details
Details for the file luna_email_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: luna_email_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba7ea9c5a58b38b7cf9a54667ab68a21b1f1972036d80400bd07cb21c62a0d15
|
|
| MD5 |
e6198d4e2b9fb42cae66b5174c811fd1
|
|
| BLAKE2b-256 |
ed04f8da93192ac5c59653d3cfc89b6d87557172d41f79b1ef7af15f453efcfc
|