Python wrapper for Emailnator and SMSNator
simple wrapper for emailnator.com and smsnator.online services, allowing you to generate disposable email addresses and phone numbers. It provides a convenient way to interact with the emailnator.com and smsnator.online APIs using Python.
- Generate disposable email addresses/phone numbers with customizable options.
- Retrieve a list of messages from a disposable email address/phone number.
- Retrieve the content of a specific email/phone message.
You can install the pynator library using pip:
pip install pynatorHere's a basic example of how to use the pynator library to generate an email address:
frompynatorimportEmailNator# Initialize the EmailNator clientclient=EmailNator()
# Generate a disposable email addressemail=client.generate_email()
# Get a list of messages for the generated email addressmessages=client.get_messages(email)
# Print the messagesformessageinmessages:
print(message)
print(client.get_message(email, message.message_id)) # print message textAnd a basic example of how to use the pynator library to generate a phone number:
frompynatorimportSMSNator# Initialize the SMSNator clientclient=SMSNator()
# Generate a disposable phone numberemail=client.generate_number()
# Get a list of messages for the generated phone numbermessages=client.get_messages(email)
# Print the messagesformessageinmessages:
print(message)
print(message.message) # print message textThis library is released under the MIT License.
Contributions to this project are welcome! Feel free to open issues, submit pull requests, or suggest improvements.
If you have any questions or need further assistance, please contact @hackirby:matrix.org
