Skip to content

Commit b8b8859

Browse files
committed
Merge branch 'release/v1.0.0'
2 parents 01fce05 + a962819 commit b8b8859

48 files changed

Lines changed: 3688 additions & 106 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coveragerc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[run]
2+
omit = *test*
3+
source = pyisemail

.gitignore

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,28 @@
1-
1+
*.py[cod]
2+
3+
# Packages
4+
*.egg
5+
*.egg-info
6+
dist
7+
build
8+
eggs
9+
parts
10+
bin
11+
var
12+
sdist
13+
develop-eggs
14+
.installed.cfg
15+
lib
16+
lib64
17+
18+
# Installer logs
19+
pip-log.txt
20+
21+
# Unit test / coverage reports
22+
.coverage
23+
.tox
24+
nosetests.xml
25+
htmlcov
26+
27+
.idea
28+
.pypirc

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
language: python
2+
python:
3+
- 2.7
4+
- 3.3
5+
- pypy
6+
install:
7+
- if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then pip install -r requirements-py2.txt --use-mirrors; fi
8+
- if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then pip install -r requirements-py3.txt --use-mirrors; fi
9+
- if [[ $TRAVIS_PYTHON_VERSION == pypy ]]; then pip install -r requirements-py2.txt --use-mirrors; fi
10+
- pip install -r requirements.txt --use-mirrors
11+
- pip install coveralls --use-mirrors
12+
script:
13+
- coverage run setup.py -q test
14+
after_success:
15+
- coveralls

.venv

Lines changed: 0 additions & 1 deletion
This file was deleted.

LICENSE

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
1-
Copyright � 2012, Michael Herold
2-
All rights reserved.
1+
Copyright (c) 2013, Michael Herold
32

4-
Redistribution and use in source and binary forms, with or without modification,
5-
are permitted provided that the following conditions are met:
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
69

7-
- Redistributions of source code must retain the above copyright notice,
8-
this list of conditions and the following disclaimer.
9-
- Redistributions in binary form must reproduce the above copyright notice,
10-
this list of conditions and the following disclaimer in the documentation
11-
and/or other materials provided with the distribution.
12-
- Neither the name of Michael Herold nor the names of its contributors may
13-
be used to endorse or promote products derived from this software without
14-
specific prior written permission.
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
1512

16-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
20-
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23-
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# pyIsEmail
2+
3+
[![Version](https://pypip.in/v/pyIsEmail/badge.png)][crate]
4+
[![Travis](https://travis-ci.org/michaelherold/pyIsEmail.png?branch=master)][travis]
5+
[![Coverage](https://coveralls.io/repos/michaelherold/pyIsEmail/badge.png?branch=master)][coveralls]
6+
7+
[crate]: https://crate.io/package/pyIsEmail
8+
[travis]: http://travis-ci.org/michaelherold/pyIsEmail
9+
[coveralls]: https://coveralls.io/r/michaelherold/pyIsEmail
10+
11+
## Getting Started
12+
13+
pyIsEmail is a no-nonsense approach for checking whether that user-supplied
14+
email address could be real. Sick of not being able to use
15+
[email address tagging][tagging] to sort through your [Bacn][bacn]? We can fix
16+
that.
17+
18+
Regular expressions are cheap to write, but often require maintenance when new
19+
top-level domains come out or don't conform to email addressing features that
20+
come back into vogue. pyIsEmail allows you to validate an email address -- and
21+
even check the domain, if you wish -- with one simple call, making your code
22+
more readable and faster to write. When you want to know why an email address
23+
doesn't validate, we even provide you with a diagnosis.
24+
25+
[tagging]: http://en.wikipedia.org/wiki/Email_address#Address_tags
26+
[bacn]: http://en.wikipedia.org/wiki/Bacn
27+
28+
## Install
29+
30+
Install from PyPI using [pip], a package manager for Python.
31+
32+
$ pip install pyIsEmail
33+
34+
Don't have pip installed? Try installing it, by running this from the command
35+
line:
36+
37+
$ curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python
38+
39+
Or, you can [download the source code (zip)][zipball] for ``pyIsEmail``, and
40+
then run:
41+
42+
$ python setup.py install
43+
44+
You may need to run the above commands with ``sudo``.
45+
46+
[pip]: http://www.pip-installer.org/en/latest/
47+
[zipball]: https://github.com/michaelherold/pyIsEmail/zipball/develop
48+
49+
## Usage
50+
51+
For the simplest usage, import and use the ``is_email`` function:
52+
53+
```python
54+
55+
from pyisemail import is_email
56+
57+
address = "test@example.com"
58+
bool_result = is_email(address)
59+
detailed_result = is_email(address, diagnose=True)
60+
```
61+
62+
You can also check whether the domain used in the email is a valid domain and
63+
whether or not it has a valid MX record:
64+
65+
```python
66+
67+
from pyisemail import is_email
68+
69+
address = "test@example.com"
70+
bool_result_with_dns = is_email(address, check_dns=True)
71+
detailed_result_with_dns = is_email(address, check_dns=True, diagnose=True)
72+
```
73+
74+
These are primary indicators of whether an email address can even be issued at
75+
that domain. However, a valid response here *is not a guarantee that the email
76+
exists*, merely that is *can* exist.
77+
78+
In addition to the base ``is_email`` functionality, you can also use the
79+
validators by themselves. Check the validator source code to see how this works.
80+
81+
## Uninstall
82+
83+
Want to get rid of pyIsEmail? Did you install with pip? Here you go:
84+
85+
$ pip uninstall pyIsEmail
86+
87+
## Acknowledgments
88+
89+
The base ``ParserValidator`` is based off of [Dominic Sayers][dominic]'
90+
[is_email script][is_email]. I wanted the functionality in Python, so I ported
91+
it from the original PHP.
92+
93+
[dominic]: https://github.com/dominicsayers
94+
[is_email]: https://github.com/dominicsayers/isemail
95+
96+
## Contributing
97+
98+
1. Fork it
99+
2. Create your feature branch (``git checkout -b my-new-feature``)
100+
3. Commit your changes (``git commit -am 'Add some feature'``)
101+
4. Push to the branch (``git push origin my-new-feature``)
102+
5. Create new Pull Request
103+
104+
## Versioning
105+
106+
This library aims to adhere to [Semantic Versioning 2.0.0][semver]. Violations
107+
of this scheme should be reported as bugs.
108+
109+
[semver]: http://semver.org/
110+
111+
## Copyright
112+
113+
Copyright (c) 2013 Michael Herold. Open sourced under the terms of the
114+
[MIT license][license].
115+
116+
[license]: http://opensource.org/licenses/MIT

README.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

pyIsEmail.egg-info/PKG-INFO

Lines changed: 0 additions & 17 deletions
This file was deleted.

pyIsEmail.egg-info/SOURCES.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

pyIsEmail.egg-info/dependency_links.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)