1
1
# Python Emailer
2
2
3
- [ ![ CircleCI] ( https://circleci.com/gh/drkostas/py-emailer /tree/master.svg?style=svg )] ( https://circleci.com/gh/drkostas/py-emailer /tree/master )
4
- [ ![ GitHub license] ( https://img.shields.io/badge/license-Apache-blue.svg )] ( https://github.com/drkostas/py-emailer /master/LICENSE )
3
+ [ ![ CircleCI] ( https://circleci.com/gh/drkostas/pyemail-sender /tree/master.svg?style=svg )] ( https://circleci.com/gh/drkostas/pyemail-sender /tree/master )
4
+ [ ![ GitHub license] ( https://img.shields.io/badge/license-Apache-blue.svg )] ( https://github.com/drkostas/pyemail-sender /master/LICENSE )
5
5
6
6
## About <a name = " about " ></a >
7
7
8
8
A utility for sending emails with attachments. Currently only Gmail
9
- is supported. [ PYPI Package] ( https://pypi.org/project/py-emailer / )
9
+ is supported. [ PYPI Package] ( https://pypi.org/project/pyemail-sender / )
10
10
11
11
## Table of Contents
12
12
@@ -24,7 +24,7 @@ is supported. [PYPI Package](https://pypi.org/project/py-emailer/)
24
24
## Using the library <a name = " using " ></a >
25
25
26
26
For a detailed usage example see
27
- [ example.py] ( https://github.com/drkostas/py-emailer /master/example.py ) .
27
+ [ example.py] ( https://github.com/drkostas/pyemail-sender /master/example.py ) .
28
28
29
29
You will need an application-specific password for your Google account.
30
30
[ Reference 1] ( https://support.google.com/mail/?p=InvalidSecondFactor ) ,
@@ -35,31 +35,31 @@ You will need an application-specific password for your Google account.
35
35
First, you need to install the library using pip:
36
36
37
37
``` shell
38
- $ pip install py_emailer
38
+ $ pip install pyemail_sender
39
39
```
40
40
41
41
Then, import it and initialize it like so:
42
42
43
43
``` python
44
- from py_emailer import GmailPyEmailer
44
+ from pyemail_sender import GmailPyEmailSender
45
45
46
46
email_conf = {' type' : ' gmail' ,
47
47
' config' : {' api_key' : ' your api key' , ' email_address' : ' youremail@gmail.com' }}
48
- pymail = GmailPyEmailer (config = email_conf)
48
+ pymail = GmailPyEmailSender (config = email_conf)
49
49
```
50
50
51
- If you want to use a yml file to load the configuration, you can use the ` PyEmailerConfig ` class:
51
+ If you want to use a yml file to load the configuration, you can use the ` PyEmailSenderConfig ` class:
52
52
``` python
53
- from py_emailer import PyEmailerConfig
53
+ from pyemail_sender import PyEmailSenderConfig
54
54
import os
55
55
56
56
config_path = str (os.path.join(' confs' , ' conf.yml' ))
57
- config = PyEmailerConfig (config_src = config_path)
58
- email_conf = config.get_pyemailer_config ()
57
+ config = PyEmailSenderConfig (config_src = config_path)
58
+ email_conf = config.get_pyemail_sender_config ()
59
59
```
60
60
61
61
Two example YAML files can be found in
62
- the [ confs folder] ( https://github.com/drkostas/py-emailer /blob/master/confs ) .
62
+ the [ confs folder] ( https://github.com/drkostas/pyemail-sender /blob/master/confs ) .
63
63
For more details on how to use this YAML configuration loader see
64
64
this [ Readme] ( https://github.com/drkostas/yaml-config-wrapper/blob/master/README.md ) .
65
65
@@ -91,7 +91,7 @@ pymail.send_email(subject='Email with all possible arguments',
91
91
```
92
92
93
93
All of these examples can be found
94
- in [ example.py] ( https://github.com/drkostas/py-emailer /tree/blob/master/example.py ) .
94
+ in [ example.py] ( https://github.com/drkostas/pyemail-sender /tree/blob/master/example.py ) .
95
95
96
96
## Manually install the library <a name = " manual_install " ></a >
97
97
@@ -117,16 +117,16 @@ $ echo $SHELL
117
117
### Install the requirements <a name = " installing_req " ></a >
118
118
119
119
All the installation steps are being handled by
120
- the [ Makefile] ( https://github.com/drkostas/py-emailer /blob/master/Makefile ) .
120
+ the [ Makefile] ( https://github.com/drkostas/pyemail-sender /blob/master/Makefile ) .
121
121
122
122
First, modify the python version (` min_python ` ) and everything else you need in
123
- the [ settings.ini] ( https://github.com/drkostas/py-emailer /blob/master/settings.ini ) .
123
+ the [ settings.ini] ( https://github.com/drkostas/pyemail-sender /blob/master/settings.ini ) .
124
124
125
125
Then, execute the following commands:
126
126
127
127
``` ShellSession
128
128
$ make create_env
129
- $ conda activate py_emailer
129
+ $ conda activate pyemail_sender
130
130
$ make dist
131
131
```
132
132
@@ -146,7 +146,7 @@ For the continuous integration, the <b>CircleCI</b> service is being used. For m
146
146
check the [ setup guide] ( https://circleci.com/docs/2.0/language-python/ ) .
147
147
148
148
For any modifications, edit
149
- the [ circleci config] ( https://github.com/drkostas/py-emailer /blob/master/.circleci/config.yml ) .
149
+ the [ circleci config] ( https://github.com/drkostas/pyemail-sender /blob/master/.circleci/config.yml ) .
150
150
151
151
## Update PyPI package <a name = " pypi " ></a >
152
152
@@ -161,13 +161,13 @@ password = your_pypi_password
161
161
162
162
Then, modify the python version (` min_python ` ), project status (` status ` ), release version (` version ` )
163
163
and everything else you need in
164
- the [ settings.ini] ( https://github.com/drkostas/py-emailer /blob/master/settings.ini ) .
164
+ the [ settings.ini] ( https://github.com/drkostas/pyemail-sender /blob/master/settings.ini ) .
165
165
166
166
Finally, execute the following commands:
167
167
168
168
``` ShellSession
169
169
$ make create_env
170
- $ conda activate py_emailer
170
+ $ conda activate pyemail_sender
171
171
$ make release
172
172
```
173
173
@@ -176,6 +176,6 @@ For a dev release, change the `testing_version` and instead of `make release`, r
176
176
## License <a name = " license " ></a >
177
177
178
178
This project is licensed under the MIT License - see
179
- the [ LICENSE] ( https://github.com/drkostas/py-emailer /blob/master/LICENSE ) file for details.
179
+ the [ LICENSE] ( https://github.com/drkostas/pyemail-sender /blob/master/LICENSE ) file for details.
180
180
181
181
<a href =" https://www.buymeacoffee.com/drkostas " target =" _blank " ><img src =" https://cdn.buymeacoffee.com/buttons/default-orange.png " alt =" Buy Me A Coffee " height =" 41 " width =" 174 " ></a >
0 commit comments