email_split-1.0.0
توضیحات
Split an email address into its local and domain parts
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | email_split-1.0.0 |
| نام | email_split |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Todd Wolfson |
| ایمیل نویسنده | todd@twolfson.com |
| آدرس صفحه اصلی | https://github.com/underdogio/python-email-split |
| آدرس اینترنتی | https://pypi.org/project/email_split/ |
| مجوز | MIT |
email-split
===========
.. image:: https://travis-ci.org/underdogio/python-email-split.svg?branch=master
:target: https://travis-ci.org/underdogio/python-email-split
:alt: Build Status
Split an email address into its local and domain parts
This was built to grab the name used off of an email address. This library does not perform validation as we retrieve our email addresses from a trusted source.
This was `initially written in JavaScript`_ and has been ported to Python.
.. _initially written in JavaScript: https://github.com/underdogio/email-split
Getting Started
---------------
Install the module with: ``pip install email_split``
.. code:: python
from email_split import email_split
email = email_split('todd@underdog.io')
email.local # todd
email.domain # underdog.io
Documentation
-------------
We export the function ``email_split`` from our module ``email_split``.
email_split(email)
^^^^^^^^^^^^^^^^^^
Function that extracts local and domain parts of email address.
- email ``str`` - Email address to break down
**Returns:**
- email ``object`` - Object representing email address
- local ``str`` - Leading portion of email address
- For example, ``todd`` in ``todd@underdog.io``
- domain ``str`` - Tailing portion of email address
- For example, ``underdog.io`` in ``todd@underdog.io``
..
We chose the names `local` and `domain` based off of the RFC specification for `mailto`.
https://tools.ietf.org/html/rfc5322#section-3.4.1
Contributing
------------
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Test and lint via ``./test.sh``.
License
-------
Copyright (c) 2016 Underdog.io
Licensed under the MIT license.
نحوه نصب
نصب پکیج whl email_split-1.0.0:
pip install email_split-1.0.0.whl
نصب پکیج tar.gz email_split-1.0.0:
pip install email_split-1.0.0.tar.gz