Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SendGrid Attachment Support Added #1190

Merged
merged 1 commit into from
Aug 27, 2024
Merged

Conversation

caronc
Copy link
Owner

@caronc caronc commented Aug 27, 2024

Description:

Related issue (if applicable): Apprise Discussion 1189

SendGrid now supports Attachments

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (use flake8)
  • 100% test coverage

Testing

Anyone can help test this source code as follows:

# Create a virtual environment to work in as follows:
python3 -m venv apprise

# Change into our new directory
cd apprise

# Activate our virtual environment
source bin/activate

# Install the branch
pip install git+https://github.com/caronc/apprise.git@sendgrid-attachment-support

# Test out the changes with the following command:
apprise -t "Test Title" -b "Test Message" \
  "sendgrid;//credentials/" --attach=/path/to/file

Copy link

codecov bot commented Aug 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.35%. Comparing base (3cb270c) to head (521cd58).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1190   +/-   ##
=======================================
  Coverage   99.35%   99.35%           
=======================================
  Files         146      146           
  Lines       20186    20213   +27     
  Branches     3967     3972    +5     
=======================================
+ Hits        20055    20082   +27     
  Misses        121      121           
  Partials       10       10           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@caronc caronc merged commit ca50cb7 into master Aug 27, 2024
14 checks passed
@jayasimha-raghavan-unskript
Copy link

jayasimha-raghavan-unskript commented Aug 27, 2024

Thank you @caronc thats Awesome!!

Verified your fix

Installing

pip install git+https://github.com/caronc/apprise.git@sendgrid-attachment-support
Collecting git+https://github.com/caronc/apprise.git@sendgrid-attachment-support
  Cloning https://github.com/caronc/apprise.git (to revision sendgrid-attachment-support) to /private/var/folders/gn/4x4_vv310tzc7pt42yf58_j80000gn/T/pip-req-build-01ygc3kh
  Running command git clone --filter=blob:none --quiet https://github.com/caronc/apprise.git /private/var/folders/gn/4x4_vv310tzc7pt42yf58_j80000gn/T/pip-req-build-01ygc3kh
  Running command git checkout -b sendgrid-attachment-support --track origin/sendgrid-attachment-support
  Switched to a new branch 'sendgrid-attachment-support'
  branch 'sendgrid-attachment-support' set up to track 'origin/sendgrid-attachment-support'.
  Resolved https://github.com/caronc/apprise.git to commit 521cd58c40ffa3b3de6357c4daa9b77bd9b472c1
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting certifi (from apprise==1.8.1)
  Using cached certifi-2024.7.4-py3-none-any.whl.metadata (2.2 kB)
Collecting requests (from apprise==1.8.1)
  Using cached requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
Collecting requests-oauthlib (from apprise==1.8.1)
  Using cached requests_oauthlib-2.0.0-py2.py3-none-any.whl.metadata (11 kB)
Collecting click>=5.0 (from apprise==1.8.1)
  Using cached click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
Collecting markdown (from apprise==1.8.1)
  Downloading Markdown-3.7-py3-none-any.whl.metadata (7.0 kB)
Collecting PyYAML (from apprise==1.8.1)
  Using cached PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl.metadata (2.1 kB)
Collecting charset-normalizer<4,>=2 (from requests->apprise==1.8.1)
  Using cached charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl.metadata (33 kB)
Collecting idna<4,>=2.5 (from requests->apprise==1.8.1)
  Downloading idna-3.8-py3-none-any.whl.metadata (9.9 kB)
Collecting urllib3<3,>=1.21.1 (from requests->apprise==1.8.1)
  Using cached urllib3-2.2.2-py3-none-any.whl.metadata (6.4 kB)
Collecting oauthlib>=3.0.0 (from requests-oauthlib->apprise==1.8.1)
  Using cached oauthlib-3.2.2-py3-none-any.whl.metadata (7.5 kB)
Using cached click-8.1.7-py3-none-any.whl (97 kB)
Using cached certifi-2024.7.4-py3-none-any.whl (162 kB)
Downloading Markdown-3.7-py3-none-any.whl (106 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 106.3/106.3 kB 2.0 MB/s eta 0:00:00
Using cached PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl (183 kB)
Using cached requests-2.32.3-py3-none-any.whl (64 kB)
Using cached requests_oauthlib-2.0.0-py2.py3-none-any.whl (24 kB)
Using cached charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl (122 kB)
Downloading idna-3.8-py3-none-any.whl (66 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.9/66.9 kB 2.2 MB/s eta 0:00:00
Using cached oauthlib-3.2.2-py3-none-any.whl (151 kB)
Using cached urllib3-2.2.2-py3-none-any.whl (121 kB)
Building wheels for collected packages: apprise
  Building wheel for apprise (pyproject.toml) ... done
  Created wheel for apprise: filename=apprise-1.8.1-py3-none-any.whl size=1302597 sha256=6cfbd5591232f30b071469fb0d190fec0d9376082c11aa7dcdc152ebdb0aaf55
  Stored in directory: /private/var/folders/gn/4x4_vv310tzc7pt42yf58_j80000gn/T/pip-ephem-wheel-cache-fag11czb/wheels/3d/7c/56/1dd6e5af71f69a5f6e3174b2573b8c107033490cb93b2ff3fe
Successfully built apprise
Installing collected packages: urllib3, PyYAML, oauthlib, markdown, idna, click, charset-normalizer, certifi, requests, requests-oauthlib, apprise
Successfully installed PyYAML-6.0.2 apprise-1.8.1 certifi-2024.7.4 charset-normalizer-3.3.2 click-8.1.7 idna-3.8 markdown-3.7 oauthlib-3.2.2 requests-2.32.3 requests-oauthlib-2.0.0 urllib3-2.2.2

Testing

$:  apprise -t "Testing Sendgrid Attachment" -b "Testing Sendgrid Attachment" --attach="/path/to/test.png" "sendgrid://<SENDGRID_API_KEY>:<FROM_EMAIL>/<TO_EMAIL>"
$: 

@caronc caronc deleted the sendgrid-attachment-support branch August 27, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants