Rename the module to imbox to avoid namespace overlap with the Python module

This commit is contained in:
Martin Rusev
2013-07-30 14:13:06 +03:00
parent 3ea4bd4bf6
commit 8dcc527c7f
5 changed files with 15 additions and 15 deletions

View File

@@ -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:

View File

@@ -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):

View File

@@ -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=[],