Skip to main content

imap-storage

Build Status License: GPL v3 Documentation Status

Use your Email-account as Storage for data structures and files

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. Have a look at the documentation.

Introducing notes

  • Before reaching version 1.0, the storage layout may change when updating

Prerequisites

python3.5 or later. It should work Python3.4+ but tests are running on 2.7, 3.5 and 3.7.

This project makes use of the following libraries:

  • IMAPClient - easy-to-use, Pythonic and complete IMAP client library.
  • lxml - the most feature-rich and easy-to-use library for processing XML and HTML in the Python language

Installing

You can install the latest release from pip:

pip install imap-storage

Short example

from imap_storage import Account, Config

config = Config()
config.imap.user = 'email@example.com'
config.imap.password = '123'
config.imap.host = 'imap.example.com'  # config.imap.port default is 993

account = Account(config, 1)
directory = account.storage.directory_by_path(account.config.directory)
email = directory.new_email('Your_first_item')
email.add_item('TestMessage', text='Your first message')
email.save()
email.delete()
account.close()

Running the tests

Rename 'secrets.sample.py' in tests directory to 'secrets.py' and include your e-mail account for testing. Then run this inside root directory:

python -m unittest  # tests all
python -m unittest tests.test_account  # tests only account

or run it with coverage:

coverage run --source='imap_storage' -m unittest && coverage report -m --skip-covered

And coding style tests

Code style is not finished, mostly because of missing docstrings.

pylint imap_storage

Deployment

This library is not ready to be deployed productive

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. During beta development minor versions may be incompatible, too.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details

Release files for imap-storage 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for imap-storage 0.2.1
File Interpreter ABI Platform
imap_storage-0.2.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Release files / imap_storage-0.2.1-py2.py3-none-any.whl

Download URL imap_storage-0.2.1-py2.py3-none-any.whl
Size 39.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
337220cc3f7df68164a4b0202f768815ef1db44240c6b60e807ef7ac9d5ceef3
BLAKE2b-256 checksum
How to use checksums
ce7162590e30dc32d1415121bfd471916c76259ffec6d5f5b929285202c44162
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file

0.2.0

1 release file

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page