Skip to content

Commit 3877a8f

Browse files
Rolling up diverging changes from master branch
1 parent c97ec64 commit 3877a8f

Some content is hidden

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

46 files changed

+787
-192
lines changed

.github/PULL_REQUEST_TEMPLATE

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ Closes #2
2121
-
2222
-
2323

24-
If you have questions, please send an email to [Sendgrid](mailto:[email protected]), or file a Github Issue in this repository.
24+
If you have questions, please send an email to [SendGrid](mailto:[email protected]), or file a GitHub Issue in this repository.

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ coverage.xml
2121
htmlcov
2222
temp.py
2323
.vscode
24-
sendgrid/VERSION.txt
24+
live_test.py

CHANGELOG.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ All notable changes to this project will be documented in this file.
4141
- [PR #365](https://github.com/sendgrid/sendgrid-python/pull/365): Write tutorial to deploy simple Django app on Heroku. Big thanks to [Kan Ouivirach](https://github.com/zkan) for the PR!
4242
- [PR #526](https://github.com/sendgrid/sendgrid-python/pull/526): Include code reviews section. Big thanks to [Jared Scott](https://github.com/jlax47) for the PR!
4343
- [PR #414](https://github.com/sendgrid/sendgrid-python/pull/414): Provide utf-8 as encoding explicitly when opening text files. Big thanks to [Ruslan Shestopalyuk](https://github.com/rshest) for the PR!
44-
- [PR #537](https://github.com/sendgrid/sendgrid-python/pull/537): Add unittesting support to .codeclimate.yml. Big thanks to [Prashu Chaudhary](https://github.com/prashuchaudhary) for the PR!
44+
- [PR #537](https://github.com/sendgrid/sendgrid-python/pull/537): Add unit testing support to .codeclimate.yml. Big thanks to [Prashu Chaudhary](https://github.com/prashuchaudhary) for the PR!
4545
- [PR #554](https://github.com/sendgrid/sendgrid-python/pull/554): Ensure params are applied independently. Big thanks to [Nino Milenovic](https://github.com/rubyengineer) for the PR!
4646
- [PR #557](https://github.com/sendgrid/sendgrid-python/pull/557): Client cleanup. Big thanks to [Slam](https://github.com/3lnc) for the PR!
4747
- [PR #569](https://github.com/sendgrid/sendgrid-python/pull/569): Make Mail helper parameters truly optional. Big thanks to [Ian Beck](https://github.com/onecrayon) for the PR!
@@ -51,21 +51,21 @@ All notable changes to this project will be documented in this file.
5151
- [PR #421](https://github.com/sendgrid/sendgrid-python/pull/421): Typos. Big thanks to [Abhishek Bhatt](https://github.com/ab-bh) for the PR!
5252
- [PR #432](https://github.com/sendgrid/sendgrid-python/pull/432): Typos. Big thanks to [Gaurav Arora](https://github.com/gaurav61) for the PR!
5353
- [PR #431](https://github.com/sendgrid/sendgrid-python/pull/431): Typos. Big thanks to [Gaurav Arora](https://github.com/gaurav61) for the PR!
54-
- [PR #430](https://github.com/sendgrid/sendgrid-python/pull/430): Attempt to sync before executing shell command. Big thanks to [Aditya Narayan](https://github.com/aditnryn) for the PR!
54+
- [PR #430](https://github.com/sendgrid/sendgrid-python/pull/430): Attempt to sync before executing the shell command. Big thanks to [Aditya Narayan](https://github.com/aditnryn) for the PR!
5555
- [PR #429](https://github.com/sendgrid/sendgrid-python/pull/429): Typos. Big thanks to [daluntw](https://github.com/daluntw) for the PR!
5656
- [PR #492](https://github.com/sendgrid/sendgrid-python/pull/492):
5757
Updated date-range in LICENSE file. Big thanks to [Dhruv Srivastava](https://github.com/dhruvhacks) for the PR!
5858
- [PR #482](https://github.com/sendgrid/sendgrid-python/pull/482): Typos. Big thanks to [Karan Samani](https://github.com/Kimi450) for the PR!
5959
- [PR #504](https://github.com/sendgrid/sendgrid-python/pull/504): Fix .codeclimate.yml. Big thanks to [Matt Bernier](https://github.com/mbernier) for the PR!
60-
- [PR #505](https://github.com/sendgrid/sendgrid-python/pull/505): Remove unnecessary github PR templates. Big thanks to [Alex](https://github.com/pushkyn) for the PR!
60+
- [PR #505](https://github.com/sendgrid/sendgrid-python/pull/505): Remove unnecessary GitHub PR templates. Big thanks to [Alex](https://github.com/pushkyn) for the PR!
6161
- [PR #494](https://github.com/sendgrid/sendgrid-python/pull/494): Remove unused import in register.py. Big thanks to [Alexis Rivera De La Torre](https://github.com/gardlt) for the PR!
6262
- [PR #469](https://github.com/sendgrid/sendgrid-python/pull/469):
6363
Removed the trailing white spaces. Big thanks to [Siddaram Halli](https://github.com/SidduH) for the PR!
6464
- [PR #484](https://github.com/sendgrid/sendgrid-python/pull/484): Python style fixes. Big thanks to [Gabriel Krell](https://github.com/gabrielkrell) for the PR!
6565
- [PR #508](https://github.com/sendgrid/sendgrid-python/pull/508): Typos. Big thanks to [Saksham Gupta](https://github.com/shucon) for the PR!
6666
- [PR #353](https://github.com/sendgrid/sendgrid-python/pull/353): Typos. Big thanks to [Yothin M](https://github.com/yothinix) for the PR!
6767
- [PR #564](https://github.com/sendgrid/sendgrid-python/pull/564): Typos. Big thanks to [Chao](https://github.com/chaoranxie) for the PR!
68-
- [PR #424](https://github.com/sendgrid/sendgrid-python/pull/424): Updating version 2.7.8 to 2.7.11 to match version in pyenv install instruction. Big thanks to [Krista LaFentres](https://github.com/lafentres) for the PR!
68+
- [PR #424](https://github.com/sendgrid/sendgrid-python/pull/424): Updating version 2.7.8 to 2.7.11 to match the version in pyenv install instruction. Big thanks to [Krista LaFentres](https://github.com/lafentres) for the PR!
6969
- [PR #454](https://github.com/sendgrid/sendgrid-python/pull/454): Requests to send mail with both plain text and HTML content fail if the HTML content is specified first. Big thanks to [Ryan D'souza](https://github.com/dsouzarc) for the PR!
7070
- [PR #466](https://github.com/sendgrid/sendgrid-python/pull/466): Fixed PEP8 issues. Big thanks to [Piotr Szwarc](https://github.com/blackpioter) for the PR!
7171
- [PR #522](https://github.com/sendgrid/sendgrid-python/pull/522): Typos. Big thanks to [Abhishek J](https://github.com/slashstar) for the PR!

CODE_OF_CONDUCT.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SendGrid Community Code of Conduct
22

3-
The SendGrid open source community is made up of members from around the globe with a diverse set of skills, personalities, and experiences. It is through these differences that our community experiences successes and continued growth. When you're working with members of the community, we encourage you to follow these guidelines, which help steer our interactions and strive to maintain a positive, successful and growing community.
3+
The SendGrid open source community is made up of members from around the globe with a diverse set of skills, personalities, and experiences. It is through these differences that our community experiences successes and continued growth. When you're working with members of the community, we encourage you to follow these guidelines, which help steer our interactions and strive to maintain a positive, successful and growing community.
44

55
### Be Open
66
Members of the community are open to collaboration, whether it's on pull requests, code reviews, approvals, issues or otherwise. We're receptive to constructive comments and criticism, as the experiences and skill sets of all members contribute to the whole of our efforts. We're accepting of all who wish to take part in our activities, fostering an environment where anyone can participate, and everyone can make a difference.
@@ -17,7 +17,7 @@
1717
Community discussions often involve interested parties. We expect participants to be aware when they are conflicted due to employment or other projects they are involved in and disclose those interests to other project members. When in doubt, over-disclose. Perceived conflicts of interest are important to address so that the community’s decisions are credible even when unpopular, difficult or favorable to the interests of one group over another.
1818

1919
### Interpretation
20-
This Code is not exhaustive or complete. It is not a rulebook; it serves to distill our common understanding of a collaborative, shared environment and goals. We expect it to be followed in spirit as much as in the letter. When in doubt, try to abide by [SendGrid’s cultural values](https://sendgrid.com/blog/employee-engagement-the-4h-way) defined by our “4H’s”: Happy, Hungry, Humble and Honest.
20+
This Code is not exhaustive or complete. It is not a rulebook; it serves to distill our common understanding of a collaborative, shared environment and goals. We expect it to be followed in spirit as much as in the letter. When in doubt, try to abide by [SendGrid’s cultural values](https://sendgrid.com/blog/employee-engagement-the-4h-way) defined by our “4H’s”: Happy, Hungry, Humble and Honest.
2121

2222
### Enforcement
2323
Most members of the SendGrid community always comply with this Code, not because of the existence of this Code, but because they have long experience participating in open source communities where the conduct described above is normal and expected. However, failure to observe this Code may be grounds for suspension, reporting the user for abuse or changing permissions for outside contributors.
@@ -30,12 +30,12 @@
3030
**Contact the Moderators** - You can reach the SendGrid moderators by emailing [email protected].
3131

3232
## Submission to SendGrid Repositories
33-
Finally, just a reminder, changes to the SendGrid repositories will only be accepted upon completion of the [SendGrid Contributor Agreement](https://cla.sendgrid.com).
33+
Finally, just a reminder, changes to the SendGrid repositories will only be accepted upon completion of the [SendGrid Contributor Agreement](https://cla.sendgrid.com).
3434

3535
## Attribution
3636

3737
SendGrid thanks the following, on which it draws for content and inspiration:
3838

39-
* [Python Community Code of Conduct](https://www.python.org/psf/codeofconduct/)
40-
* [Open Source Initiative General Code of Conduct](https://opensource.org/codeofconduct)
41-
* [Apache Code of Conduct](https://www.apache.org/foundation/policies/conduct.html)
39+
* [Python Community Code of Conduct](https://www.python.org/psf/codeofconduct)
40+
* [Open Source Initiative General Code of Conduct](https://opensource.org/codeofconduct)
41+
* [Apache Code of Conduct](https://www.apache.org/foundation/policies/conduct.html)

CONTRIBUTING.md

+22-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
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.
22

3-
- [CLAs and CCLAs](#cla)
4-
- [Roadmap & Milestones](#roadmap)
3+
- [CLAs and CCLAs](#clas-and-cclas)
54
- [Feature Request](#feature-request)
65
- [Submit a Bug Report](#submit-a-bug-report)
6+
- [Please use our Bug Report Template](#please-use-our-bug-report-template)
77
- [Improvements to the Codebase](#improvements-to-the-codebase)
8-
- [Understanding the Code Base](#understanding-the-codebase)
8+
- [Development Environment](#development-environment)
9+
- [There are two ways to get set up:](#there-are-two-ways-to-get-set-up)
10+
- [1. Using Docker](#1-using-docker)
11+
- [- OR -](#or)
12+
- [2. Install and Run Locally](#2-install-and-run-locally)
13+
- [Prerequisites](#prerequisites)
14+
- [Initial setup:](#initial-setup)
15+
- [Environment Variables](#environment-variables)
16+
- [Execute:](#execute)
17+
- [Understanding the Code Base](#understanding-the-code-base)
918
- [Testing](#testing)
10-
- [Style Guidelines & Naming Conventions](#style-guidelines-and-naming-conventions)
11-
- [Creating a Pull Request](#creating-a-pull-request)
19+
- [Testing Multiple Versions of Python](#testing-multiple-versions-of-python)
20+
- [Prerequisites:](#prerequisites)
21+
- [Initial setup:](#initial-setup-1)
22+
- [Execute:](#execute-1)
23+
- [Style Guidelines & Naming Conventions](#style-guidelines--naming-conventions)
24+
- [Creating a Pull Request<a name="creating-a-pull-request"></a>](#creating-a-pull-requesta-name%22creating-a-pull-request%22a)
1225
- [Code Reviews](#code-reviews)
1326

1427
<a name="roadmap"></a>
@@ -46,8 +59,8 @@ A software bug is a demonstrable issue in the code base. In order for us to diag
4659

4760
Before you decide to create a new issue, please try the following:
4861

49-
1. Check the Github issues tab if the identified issue has already been reported, if so, please add a +1 to the existing post.
50-
2. Update to the latest version of this code and check if issue has already been fixed
62+
1. Check the GitHub issues tab if the identified issue has already been reported, if so, please add a +1 to the existing post.
63+
2. Update to the latest version of this code and check if the issue has already been fixed
5164
3. Copy and fill in the Bug Report Template we have provided below
5265

5366
### Please use our Bug Report Template
@@ -112,7 +125,7 @@ Working examples that demonstrate usage.
112125

113126
**/tests**
114127

115-
Currently we have unit and profiling tests.
128+
Currently, we have unit and profiling tests.
116129

117130
**/sendgrid**
118131

@@ -240,4 +253,4 @@ If you have any additional questions, please feel free to [email](mailto:dx@send
240253

241254
<a name="code-reviews"></a>
242255
## Code Reviews
243-
If you can, please look at open PRs and review them. Give feedback and help us merge these PRs much faster! If you don't know how, Github has some great [information on how to review a Pull Request](https://help.github.com/articles/about-pull-request-reviews/).
256+
If you can, please look at open PRs and review them. Give feedback and help us merge these PRs much faster! If you don't know how, GitHub has some great [information on how to review a Pull Request](https://help.github.com/articles/about-pull-request-reviews/).

README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Hello Email
9797
-----------
9898

9999
The following is the minimum needed code to send an email with the `/mail/send Helper`_
100-
(`here <https://github.com/sendgrid/sendgrid-python/blob/master/examples/helpers/mail_example.py#L192>`__ is a full example):
100+
(`here <https://github.com/sendgrid/sendgrid-python/blob/master/examples/helpers/mail/mail_example.py#L192>`__ is a full example):
101101

102102
With Mail Helper Class
103103
~~~~~~~~~~~~~~~~~~~~~~
@@ -120,7 +120,7 @@ With Mail Helper Class
120120
print(response.headers)
121121
122122
The ``Mail`` constructor creates a `personalization object`_ for you.
123-
`Here <https://github.com/sendgrid/sendgrid-python/blob/master/examples/helpers/mail_example.py#L16>`__ is an example of how to add it.
123+
`Here <https://github.com/sendgrid/sendgrid-python/blob/master/examples/helpers/mail/mail_example.py#L16>`__ is an example of how to add it.
124124

125125
Without Mail Helper Class
126126
~~~~~~~~~~~~~~~~~~~~~~~~~

TROUBLESHOOTING.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ All of our examples assume you are using [environment variables](https://github.
2121

2222
If you choose to add your SendGrid API key directly (not recommended):
2323

24-
`apikey=os.environ.get('SENDGRID_API_KEY')`
24+
`api_key=os.environ.get('SENDGRID_API_KEY')`
2525

2626
becomes
2727

28-
`apikey='SENDGRID_API_KEY'`
28+
`api_key='SENDGRID_API_KEY'`
2929

30-
In the first case SENDGRID_API_KEY is in reference to the name of the environment variable, while the second case references the actual SendGrid API Key.
30+
In the first case, SENDGRID_API_KEY is in reference to the name of the environment variable, while the second case references the actual SendGrid API Key.
3131

3232
<a name="error"></a>
3333
## Error Messages
@@ -40,7 +40,7 @@ import urllib2
4040
try:
4141
response = sg.client.mail.send.post(request_body=mail.get())
4242
except urllib2.HTTPError as e:
43-
print e.read()
43+
print(e.read())
4444
```
4545

4646
To read the error message returned by SendGrid's API in Python 3.X:
@@ -50,7 +50,7 @@ import urllib
5050
try:
5151
response = sg.client.mail.send.post(request_body=mail.get())
5252
except urllib.error.HTTPError as e:
53-
print e.read()
53+
print(e.read())
5454
```
5555

5656
<a name="migrating"></a>
@@ -77,7 +77,7 @@ Click the "Clone or download" green button in [GitHub](https://github.com/sendgr
7777
<a name="testing"></a>
7878
## Testing v3 /mail/send Calls Directly
7979

80-
[Here](https://sendgrid.com/docs/Classroom/Send/v3_Mail_Send/curl_examples.html) are some cURL examples for common use cases.
80+
[Here](https://sendgrid.com/docs/for-developers/sending-email/curl-examples) are some cURL examples for common use cases.
8181

8282
<a name="package-manager"></a>
8383
## Using the Package Manager
@@ -111,4 +111,4 @@ You can do this right before you call `response = sg.client.mail.send.post(reque
111111
<a name="error-handling"></a>
112112
# Error Handling
113113

114-
Please review [our use_cases](https://github.com/sendgrid/sendgrid-python/use_cases/README.md) for examples of error handling.
114+
Please review [our use_cases](https://github.com/sendgrid/sendgrid-python/blob/master/use_cases/README.md) for examples of error handling.

0 commit comments

Comments
 (0)