<p align="center" <br <img src="https://github.com/qvco/1secMail-Python/assets/77382767/fde69c1a-b95f-4d78-af1a-2dca315204bc" alt="1secMail" width="700" <!-- <br 1secMail for Python <br -- </p
<h4 align="center"An API wrapper for <a href="https://www.1secmail.com/" target="blank"www.1secmail.com</a written in Python.</h4
<p align="center" <img src="https://img.shields.io/github/release/qvco/1secMail-Python" <img src="https://img.shields.io/badge/python-3.8-blue.svg" <img src="https://img.shields.io/badge/License-MIT-blue.svg" </p
About
This is an easy to use yet full-featured Python API wrapper for www.1secmail.com ↗ using the official 1secMail API. It allows you to easily create temporary email addresses for testing, verification, or other purposes where you need a disposable email address. Asynchronous operations are also supported!:thumbsup:
Install
To install the package, you'll need Python 3.8 or above installed on your computer. From your command line:
pip install 1secMail<br
Note If you're willing to install the development version, do the following:
git clone https://github.com/qvco/1secMail-Python.git
cd 1secMail-Python
pip install -r requirements.txt
pip install -e .Usage
Generating Email Addresses
To generate a list of random email addresses, use the randomemail() method:
import secmail
client = secmail.Client()
client.random_email(amount=3)
>>> ['c3fho3cry1@1secmail.net', '5qcd3d36zr@1secmail.org', 'b6fgeothtg@1secmail.net']You can also generate a custom email address by specifying the username and domain:
Note Specifying a domain is optional!
client.custom_email(username="bobby-bob", domain="kzccv.com")
>>> 'bobby-bob@kzccv.com'