You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to suggest an enhancement to the SendGrid Python client. Currently, the endpoint URL for sending emails is embedded within the client implementation. To improve flexibility and make it easier for developers to send emails without using the SendGrid client, I propose the following changes:
Define the endpoint URL as a global constant:
Create a separate configuration file (e.g., config.py) that contains the endpoint URL, such as "https://api.sendgrid.com/v3/mail/send". This way, the URL can be easily referenced and modified if needed.
Construct the URL using base and version constants:
Instead of hardcoding the full endpoint URL, define the base URL and version separately, and construct the full URL dynamically. This allows for easier updates and maintenance.
Proposed Changes:
Create a config.py file with the following content:
Introduction
Hello,
I would like to suggest an enhancement to the SendGrid Python client. Currently, the endpoint URL for sending emails is embedded within the client implementation. To improve flexibility and make it easier for developers to send emails without using the SendGrid client, I propose the following changes:
Create a separate configuration file (e.g., config.py) that contains the endpoint URL, such as "https://api.sendgrid.com/v3/mail/send". This way, the URL can be easily referenced and modified if needed.
Instead of hardcoding the full endpoint URL, define the base URL and version separately, and construct the full URL dynamically. This allows for easier updates and maintenance.
Proposed Changes:
These changes will provide more flexibility for developers and make the codebase easier to maintain.
Thank you for considering this enhancement.
Best regards,
The text was updated successfully, but these errors were encountered: