Rename the module to imbox to avoid namespace overlap with the Python module
This commit is contained in:
14
README.md
14
README.md
@@ -1,4 +1,4 @@
|
||||
Mailbox - Python IMAP for Humans
|
||||
Imbox - Python IMAP for Humans
|
||||
=======
|
||||
|
||||
Python library for reading IMAP mailboxes and converting the email content to human readable data
|
||||
@@ -6,12 +6,12 @@ Python library for reading IMAP mailboxes and converting the email content to hu
|
||||
Installation
|
||||
============
|
||||
|
||||
pip install mailbox
|
||||
pip install imbox
|
||||
|
||||
|
||||
or
|
||||
|
||||
git clone git@github.com:martinrusev/mailbox.git
|
||||
git clone git@github.com:martinrusev/imbox.git
|
||||
python setup.py install
|
||||
|
||||
|
||||
@@ -19,18 +19,18 @@ Usage
|
||||
=====
|
||||
|
||||
|
||||
from mailbox import MailBox
|
||||
from imbox import Imbox
|
||||
|
||||
mailbox = MailBox('imap.gmail.com',
|
||||
imbox = Imbox('imap.gmail.com',
|
||||
username='username',
|
||||
password='password',
|
||||
ssl=True)
|
||||
|
||||
# Gets all messages
|
||||
all_messages = mailbox.messages()
|
||||
all_messages = imbox.messages()
|
||||
|
||||
# Unread messages
|
||||
unread_messages = mailbox.messages(unread=True)
|
||||
unread_messages = imbox.messages(unread=True)
|
||||
|
||||
|
||||
for message in all_messages:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import email
|
||||
import re
|
||||
import StringIO
|
||||
from mailbox.imap import ImapTransport
|
||||
from mailbox.parser import get_mail_addresses, decode_mail_header
|
||||
from imbox.imap import ImapTransport
|
||||
from imbox.parser import get_mail_addresses, decode_mail_header
|
||||
|
||||
|
||||
class Struct(object):
|
||||
@@ -16,7 +16,7 @@ class Struct(object):
|
||||
return str(self.__dict__)
|
||||
|
||||
|
||||
class MailBox(object):
|
||||
class Imbox(object):
|
||||
|
||||
def __init__(self, hostname, username=None, password=None, ssl=True):
|
||||
|
||||
10
setup.py
10
setup.py
@@ -8,17 +8,17 @@ def read(filename):
|
||||
return open(os.path.join(os.path.dirname(__file__), filename)).read()
|
||||
|
||||
setup(
|
||||
name='mailbox',
|
||||
name='imbox',
|
||||
version=version,
|
||||
description="Python IMAP for Humans",
|
||||
description="Python IMAP for Human beings",
|
||||
long_description= read('README.md'),
|
||||
keywords='email, IMAP, parsing emails',
|
||||
author='Martin Rusev',
|
||||
author_email='martinrusev@live.com',
|
||||
url='https://github.com/martinrusev/mailbox',
|
||||
url='https://github.com/martinrusev/imbox',
|
||||
license='MIT',
|
||||
packages=['mailbox'],
|
||||
package_dir={'mailbox':'mailbox'},
|
||||
packages=['imbox'],
|
||||
package_dir={'imbox':'imbox'},
|
||||
zip_safe=False,
|
||||
install_requires=[],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user