Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/armanyazdi/emailtools
A Python library for email suggestions and validations.
https://github.com/armanyazdi/emailtools
email pypi pypi-package pypi-packages python python-libraries python-library python3
Last synced: 3 months ago
JSON representation
A Python library for email suggestions and validations.
- Host: GitHub
- URL: https://github.com/armanyazdi/emailtools
- Owner: armanyazdi
- License: mit
- Created: 2023-01-08T20:28:39.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-26T07:08:52.000Z (over 1 year ago)
- Last Synced: 2024-07-11T20:48:55.408Z (4 months ago)
- Topics: email, pypi, pypi-package, pypi-packages, python, python-libraries, python-library, python3
- Language: Python
- Homepage: https://pypi.org/project/emailtools
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# emailtools
[![PyPI](https://img.shields.io/pypi/v/emailtools?style=for-the-badge)](https://pypi.org/project/emailtools)
[![GitHub](https://img.shields.io/github/license/armanyazdi/emailtools?style=for-the-badge)](https://pypi.org/project/emailtools)A Python library for email suggestions and validations.
## Installation
Install from [PyPI](https://pypi.org/project/emailtools) with pip by typing in your favorite terminal:
This will install `persian-names` (for generating random names).
`pip install emailtools`
## Usage
Let's take a look at what an example test case would look like using `emailtools`.
### Generate Random Emails:
Note: You can use the name of email providers or their domains for the first argument.
```python
from emailtools import generate# generate('EmailProvider', 'FirstName', 'LastName', BirthYear)
generate() # Generates a random email
# Example: [email protected]generate('gmail') # Generates a random Gmail
# Example: [email protected]generate('gmail.com', 'Arash', 'Amiri')
# Example: [email protected]generate('Outlook', 'Bita', 'Alipour', 1995)
# Example: [email protected]
```### Suggest Email Usernames:
```python
from emailtools import generatefor i in range(10):
print(generate('Gmail', 'Saman', 'Rezaei', 1980))# [email protected]
# [email protected]
# [email protected]
# [email protected]
# [email protected]
# [email protected]
# [email protected]
# [email protected]
# [email protected]
# [email protected]
```### Validate Emails:
```python
from emailtools import isValidisValid('[email protected]') # True
isValid('Fariborz_Jalali20.gmail.com') # False
isValid('Mohammadrezaei-Arash7@gmail') # False
```## License
`emailtools` is available under the [MIT license](https://github.com/armanyazdi/emailtools/blob/main/LICENSE).