Skip to main content

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)

Uploaded Source

Built Distribution

freetempmail-1.0.4-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page