A Python client library for the GetTestMail API
Project description
python-sdk
Python SDK for GetTestMail
This Python client library allows you to interact with the GetTestMail API, which provides a simple way to create temporary email addresses and receive messages sent to them.
To use this library, you will need to have a GetTestMail account. If you don't have one, you can sign up for a free account.
Installation
pip install gettestmail
Usage
from gettestmail.client import GetTestMailClient
# optional parameters
expires_at = "2023-04-01T00:00:00Z"
client = GetTestMailClient("your-api-key")
test_mail = client.create_new()
print(test_mail.emailAddress)
# This will wait for a message to be received up until expires_at time
test_mail = client.wait_for_message(test_mail.id)
print(test_mail.message)
Models
GetTestMail
The GetTestMail model represents a disposable email address. It has the following attributes:
- id - The id of the email address
- emailAddress - The email address
- expiresAt - The time at which the email address will expire
- message - The message received by the email address
Message
The Message received by the email address. It has the following attributes:
- id - The id of the message
- from - The sender of the message
- to - The recipient of the message
- subject - The subject of the message
- text - Text representation of the message
- html - HTML representation of the message
- attachments - List of attachments
Attachment
The Attachment received by the email address. It has the following attributes:
- filename - The filename of the attachment
- mimeType - The mime type of the attachment
- content - The content of the attachment
API Documentation
TODO
License
This project is licensed under the MIT License. See the LICENSE file for details.
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 gettestmail-1.0.1.tar.gz.
File metadata
- Download URL: gettestmail-1.0.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5f938267391e806ed3d5f065614e0d0a5ed2d30dd044022630f28cd1856a8fd
|
|
| MD5 |
295e0d401e71845559f6b050d597fa11
|
|
| BLAKE2b-256 |
10e3f717d3ca8b31ad0cc5b46be7cd59569e1a34645d1cc5195e1ebde70743bd
|
File details
Details for the file gettestmail-1.0.1-py3-none-any.whl.
File metadata
- Download URL: gettestmail-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4710c1568a39a19b62b957ff8cb13163eddf3d4e6fb52eee01f45a3e75b93556
|
|
| MD5 |
8983e69db18286c9f554697b02f4e230
|
|
| BLAKE2b-256 |
0aa09d72431bbc16a58a11566a16a98c434886d11572397955541e4dfd01e840
|