Add gpgme-tool.socket-path configuration to smtplib.conf.
[pgp-mime.git] / pgp_mime / __init__.py
1 # Copyright (C) 2012 W. Trevor King <wking@tremily.us>
2 #
3 # This file is part of pgp-mime.
4 #
5 # pgp-mime is free software: you can redistribute it and/or modify it under the
6 # terms of the GNU General Public License as published by the Free Software
7 # Foundation, either version 3 of the License, or (at your option) any later
8 # version.
9 #
10 # pgp-mime is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License along with
15 # pgp-mime.  If not, see <http://www.gnu.org/licenses/>.
16
17 """Python module and tools for constructing and sending pgp/mime email.
18
19 Uses ``pyassuan`` to connect to ``gpgme-tool`` for the cryptography.
20 """
21
22 import logging as _logging
23
24
25 __version__ = '0.3'
26
27
28 LOG = _logging.getLogger('pgp-mime')
29 LOG.setLevel(_logging.ERROR)
30 LOG.addHandler(_logging.StreamHandler())
31
32
33 from .crypt import get_client_params
34 from .pgp import sign, encrypt, sign_and_encrypt, decrypt, verify
35 from .email import (
36     header_from_text, guess_encoding, encodedMIMEText, strip_bcc, append_text,
37     attach_root, getaddresses, email_sources, email_targets)
38 from .smtp import get_smtp_params, get_smtp, mail