Skip to content

Commit 9f5ac66

Browse files
Version Bump v3.0.0: full v3 Web API support
2 parents 1af90f4 + 339144b commit 9f5ac66

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+3945
-3228
lines changed

.env_sample

-1
This file was deleted.

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ venv/
1414
.python-version
1515
.tox/
1616
profile*
17-
*_example.py
1817
register.py
19-
README.txt
18+
README.txt
19+
temp.py

.travis.yml

-3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,3 @@ notifications:
2424
GitHub</a>'
2525
format: html
2626
notify: false
27-
env:
28-
matrix:
29-
secure: CYhmQGIhXrefDruEOBzMo1jZ+NPyFjDqPeqsnLHoGcYhkbp3GW+fCPHEypRMG72K/f1+Vc2/6ka76dvu6/NpflO8ooyYKzXEhds/oemGUuvcsZdVOFeGeIu3h9lpdHgeOjB3N3l7rwJU0nFTk7Bmb0bY7AVH5qfFqLJ6syEfjVU=

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4-
## [2.2.1] - 2016-03-02 ##
4+
## [3.0.0] - 2016-06-13 ##
5+
### Added
6+
- Breaking change to support the v3 Web API
7+
- New HTTP client
8+
- v3 Mail Send helper
9+
10+
## [2.1.1] - 2016-03-02 ##
511

612
### Added ###
713

CONTRIBUTING.md

+55-55
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,28 @@
1-
Hello! Thank you for choosing to help contribute to the sendgrid-python library. There are many ways you can contribute and help is always welcome.
2-
1+
Hello! Thank you for choosing to help contribute to one of the SendGrid open source libraries. There are many ways you can contribute and help is always welcome. We simply ask that you follow the following contribution policies.
2+
3+
- [CLAs and CCLAs](#cla)
4+
- [Roadmap & Milestones](#roadmap)
5+
- [Feature Request](#feature_request)
6+
- [Submit a Bug Report](#submit_a_bug_report)
7+
- [Improvements to the Codebase](#improvements_to_the_codebase)
8+
- [Understanding the Code Base](#understanding_the_codebase)
9+
- [Testing](#testing)
10+
- [Style Guidelines & Naming Conventions](#style_guidelines_and_naming_conventions)
11+
- [Creating a Pull Request](#creating_a_pull_request)
12+
13+
<a name="roadmap"></a>
314
We use [Milestones](https://github.com/sendgrid/sendgrid-python/milestones) to help define current roadmaps, please feel free to grab an issue from the current milestone. Please indicate that you have begun work on it to avoid collisions. Once a PR is made, community review, comments, suggestions and additional PRs are welcomed and encouraged.
415

5-
* [Feature Request](#feature_request)
6-
* [Submit a Bug Report](#submit_a_bug_report)
7-
* [Improvements to the Codebase](#improvements_to_the_codebase)
8-
* [Understanding the Code Base](#understanding_the_codebase)
9-
* [Testing](#testing)
10-
* [Testing Multiple Versions of Python](#testing_multiple_versoins_of_python)
11-
* [Style Guidelines & Naming Conventions](#style_guidelines_and_naming_conventions)
12-
* [Creating a Pull Request](#creating_a_pull_request)
16+
<a name="cla"></a>
17+
## CLAs and CCLAs
18+
19+
Before you get started, SendGrid requires that a SendGrid Contributor License Agreement (CLA) or a SendGrid Company Contributor Licensing Agreement (CCLA) be filled out by every contributor to a SendGrid open source project.
20+
21+
Our goal with the CLA and CCLA is to clarify the rights of our contributors and reduce other risks arising from inappropriate contributions. The CLA also clarifies the rights SendGrid holds in each contribution and helps to avoid misunderstandings over what rights each contributor is required to grant to SendGrid when making a contribution. In this way the CLA and CCLA encourage broad participation by our open source community and help us build strong open source projects, free from any individual contributor withholding or revoking rights to any contribution.
22+
23+
SendGrid does not merge a pull request made against a SendGrid open source project until that pull request is associated with a signed CLA (or CCLA). Copies of the CLA and CCLA are available [here](https://drive.google.com/a/sendgrid.com/file/d/0B0PlcM9qA91LN2VEUTJWU2RIVXc/view).
24+
25+
You may submit your completed [CLA or CCLA](https://drive.google.com/a/sendgrid.com/file/d/0B0PlcM9qA91LN2VEUTJWU2RIVXc/view) to SendGrid at [[email protected]](mailto:[email protected]). SendGrid will then confirm you are ready to begin making contributions.
1326

1427
There are a few ways to contribute, which we'll enumerate below:
1528

@@ -38,29 +51,7 @@ Before you decide to create a new issue, please try the following:
3851

3952
### Please use our Bug Report Template
4053

41-
In order to make the process easier, we've included a sample bug report template (borrowed from [Ghost](https://github.com/TryGhost/Ghost/)). The template uses [GitHub flavored markdown](https://help.github.com/articles/github-flavored-markdown/) for formatting.
42-
43-
```
44-
Short and descriptive example bug report title
45-
46-
#### Issue Summary
47-
48-
A summary of the issue and the environment in which it occurs. If suitable, include the steps required to reproduce the bug. Please feel free to include screenshots, screencasts, code examples.
49-
50-
51-
#### Steps to Reproduce
52-
53-
1. This is the first step
54-
2. This is the second step
55-
3. Further steps, etc.
56-
57-
Any other information you want to share that is relevant to the issue being reported. Especially, why do you consider this to be a bug? What do you expect to happen instead?
58-
59-
#### Technical details:
60-
61-
* sendgrid-python Version: master (latest commit: 2cb34372ef0f31352f7c90015a45e1200cb849da)
62-
* Python Version: 2.7
63-
```
54+
In order to make the process easier, we've included a [sample bug report template]((https://github.com/sendgrid/sendgrid-python/.github/ISSUE_TEMPLATE)) (borrowed from [Ghost](https://github.com/TryGhost/Ghost/)). The template uses [GitHub flavored markdown](https://help.github.com/articles/github-flavored-markdown/) for formatting.
6455

6556
<a name="improvements_to_the_codebase"></a>
6657
## Improvements to the Codebase
@@ -69,27 +60,38 @@ We welcome direct contributions to the sendgrid-python code base. Thank you!
6960

7061
### Development Environment ###
7162

72-
#### Install and run locally ####
63+
#### Install and Run Locally ####
7364

7465
##### Prerequisites #####
7566

76-
* Python 2.6 through 3.5
77-
* smtpapi-python
78-
* python_http_client
67+
- Python 2.6 through 3.5
68+
- [python_http_client](https://github.com/sendgrid/python-http-client)
7969

8070
##### Initial setup: #####
8171

82-
```
72+
```bash
8373
git clone https://github.com/sendgrid/sendgrid-python.git
8474
cd sendgrid-python
8575
```
8676

87-
Update your settings in `.env`
77+
## Environment Variables
78+
79+
First, get your free SendGrid account [here](https://sendgrid.com/free?source=sendgrid-python).
80+
81+
Next, update your environment with your [SENDGRID_API_KEY](https://app.sendgrid.com/settings/api_keys).
82+
83+
```bash
84+
echo "export SENDGRID_API_KEY='YOUR_API_KEY'" > sendgrid.env
85+
echo "sendgrid.env" >> .gitignore
86+
source ./sendgrid.env
87+
```
8888

8989
##### Execute: #####
9090

9191
See the [examples folder](https://github.com/sendgrid/sendgrid-python/tree/master/examples) to get started quickly.
9292

93+
If testing from the root directory of this repo, create a new file (e.g. test.py) and replace `import sendgrid` with `from sendgrid import *`
94+
9395
<a name="understanding_the_codebase"></a>
9496
## Understanding the Code Base
9597

@@ -99,20 +101,20 @@ Working examples that demonstrate usage.
99101

100102
**/tests**
101103

102-
Tests for the mail send and Web API v3 endpoints.
104+
Currently we have unit and profiling tests.
103105

104106
**/sendgrid**
105107

106-
The Web API v3 client is `client.py`, the other files are legacy code for our mail send v2 endpoint.
108+
The Web API v3 client is `sendgrid.py`, the other files are legacy code for our mail send v2 endpoint.
107109

108110
<a name="testing"></a>
109111
## Testing
110112

111113
All PRs require passing tests before the PR will be reviewed.
112114

113-
All test files are in the `[tests](https://github.com/sendgrid/sendgrid-python/tree/master/tests)` directory.
115+
All test files are in the [`test`](https://github.com/sendgrid/sendgrid-python/test) directory.
114116

115-
For the purposes of contributing to this repo, please update the [`test_v3_endpoints.py`](https://github.com/sendgrid/sendgrid-python/blob/master/test/test_v3_endpoints.py) file with unit tests as you modify the code.
117+
For the purposes of contributing to this repo, please update the [`test_sendgrid.py`](https://github.com/sendgrid/sendgrid-python/tree/master/test/test_sendgrid.py) file with unit tests as you modify the code.
116118

117119
For Python 2.6.*:
118120

@@ -122,19 +124,18 @@ For Python 2.7.* and up:
122124

123125
`python -m unittest discover -v`
124126

125-
<a name="testing_multiple_versoins_of_python"></a>
126-
## Testing Multiple Versions of Python
127+
### Testing Multiple Versions of Python
127128

128129
All PRs require passing tests before the PR will be reviewed.
129130

130-
### Prequisites: ###
131+
#### Prequisites: ####
131132

132133
The above local "Initial setup" is complete
133134

134135
* [pyenv](https://github.com/yyuu/pyenv)
135136
* [tox](https://pypi.python.org/pypi/tox)
136137

137-
### Initial setup: ###
138+
#### Initial setup: ####
138139

139140
Add ```eval "$(pyenv init -)"``` to your shell environment (.profile, .bashrc, etc) after installing tox, you only need to do this once.
140141

@@ -148,9 +149,9 @@ pyenv install 3.5.0
148149
python setup.py install
149150
pyenv local 3.5.0 3.4.3 3.3.6 3.2.6 2.7.8 2.6.9
150151
pyenv rehash
151-
````
152+
```
152153

153-
### Execute: ###
154+
#### Execute: ####
154155

155156
```
156157
source venv/bin/activate
@@ -162,14 +163,13 @@ tox
162163

163164
Generally, we follow the style guidelines as suggested by the official language. However, we ask that you conform to the styles that already exist in the library. If you wish to deviate, please explain your reasoning.
164165

165-
* [PEP8](https://www.python.org/dev/peps/pep-0008/)
166-
167-
Please run your code through [pyflakes](https://pypi.python.org/pypi/pyflakes), [pylint](https://www.pylint.org/) and [pep8](https://pypi.python.org/pypi/pep8)
166+
- [PEP8](https://www.python.org/dev/peps/pep-0008/)
168167

169-
### Directory Structure
168+
Please run your code through:
170169

171-
* `examples` for example calls
172-
* `test`, for all tests
170+
- [pyflakes](https://pypi.python.org/pypi/pyflakes)
171+
- [pylint](https://www.pylint.org/)
172+
- [pep8](https://pypi.python.org/pypi/pep8)
173173

174174
## Creating a Pull Request<a name="creating_a_pull_request"></a>
175175

MIT.LICENSE renamed to LICENSE.txt

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
Copyright (c) 2016 SendGrid
1+
Copyright (c) 2012-2016 SendGrid, Inc.
22

3-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
4-
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
5-
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
4+
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
5+
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
66
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
77

8-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of
8+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of
99
the Software.
1010

11-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
12-
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
14-
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
12+
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
14+
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1515
DEALINGS IN THE SOFTWARE.

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
include README.rst
2-
include MIT.LICENSE
2+
include LICENSE.txt
33
recursive-exclude test *

0 commit comments

Comments
 (0)