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 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 Installation
============ ============
pip install mailbox pip install imbox
or or
git clone git@github.com:martinrusev/mailbox.git git clone git@github.com:martinrusev/imbox.git
python setup.py install 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', username='username',
password='password', password='password',
ssl=True) ssl=True)
# Gets all messages # Gets all messages
all_messages = mailbox.messages() all_messages = imbox.messages()
# Unread messages # Unread messages
unread_messages = mailbox.messages(unread=True) unread_messages = imbox.messages(unread=True)
for message in all_messages: for message in all_messages:

View File

@@ -1,8 +1,8 @@
import email import email
import re import re
import StringIO import StringIO
from mailbox.imap import ImapTransport from imbox.imap import ImapTransport
from mailbox.parser import get_mail_addresses, decode_mail_header from imbox.parser import get_mail_addresses, decode_mail_header
class Struct(object): class Struct(object):
@@ -16,7 +16,7 @@ class Struct(object):
return str(self.__dict__) return str(self.__dict__)
class MailBox(object): class Imbox(object):
def __init__(self, hostname, username=None, password=None, ssl=True): 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() return open(os.path.join(os.path.dirname(__file__), filename)).read()
setup( setup(
name='mailbox', name='imbox',
version=version, version=version,
description="Python IMAP for Humans", description="Python IMAP for Human beings",
long_description= read('README.md'), long_description= read('README.md'),
keywords='email, IMAP, parsing emails', keywords='email, IMAP, parsing emails',
author='Martin Rusev', author='Martin Rusev',
author_email='martinrusev@live.com', author_email='martinrusev@live.com',
url='https://github.com/martinrusev/mailbox', url='https://github.com/martinrusev/imbox',
license='MIT', license='MIT',
packages=['mailbox'], packages=['imbox'],
package_dir={'mailbox':'mailbox'}, package_dir={'imbox':'imbox'},
zip_safe=False, zip_safe=False,
install_requires=[], install_requires=[],