Temp-Mail.org API wrapper.
Project description
freetempmail - Temp-Mail.org API wrapper.
How to Use?
Quickstart Guide
import asyncio
from freetempmail import FreeTempMail
if __name__ == '__main__':
ftm = FreeTempMail() # Instantiate class
asyncio.run(ftm.generate_mail()) # Generate a temporary mail
email = ftm.get_email() # Fetch email info
print(email)
messages = ftm.get_messages() # Fetch messages in mailbox
print(messages)
message_id = messages[0]['_id'] # Fetch a specific message by ID
message_content = ftm.get_message(message_id)
print(message_content)
Receive and Process a New Message
import asyncio
from freetempmail import FreeTempMail
if __name__ == '__main__':
ftm = FreeTempMail() # Instantiate class
asyncio.run(ftm.generate_mail()) # Generate a temporary mail
email = ftm.get_email() # Fetch email info
print(email)
new_message = ftm.wait_message() # Wait and fetch a new message
print(new_message)
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
freetempmail-1.0.4.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for freetempmail-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80daaecaa9588d2a5a42ddd5dde6e5eac4aff966ff8feb1520c5576d6078ac6d |
|
MD5 | fb97f019218ffef0c9a8e62cff25d088 |
|
BLAKE2b-256 | 79ea3d7a81b36f3fd4a05b40e0c0c9532ab859c58d1b066d8677667fe75443e5 |