easybrevo
Use Brevo API with Python (the easy way).
Installation
pip install easybrevo
Usage
First of all, you have to instantiate an API client:
from easybrevo import ApiClient
client = ApiClient()
ApiClient() admits one argument api_key → Brevo API key (Generate from here).
If
api_keyis not provided, its value will be collected fromBREVO_API_KEYwithin a.envfile or as an environment variable. Otherwise an error will raise.
Sending an email
The quickest way to send an email is the following:
client.send_email(
to="hello@example.com",
subject="This is the subject",
content="This is the content"
)
Sender
send_mail() admits arguments sender_email and sender_name in order to set sender information when sending the email.
If
sender_emailis not provided, its value will be collected fromBREVO_SENDER_EMAILwithin a.envfile or as an environment variable. Otherwise a dumb default value is used.
If
sender_nameis not provided, its value will be collected fromBREVO_SENDER_NAMEwithin a.envfile or as an environment variable. Otherwise a dumb default value is used.
Content type
By default, the content of the email is intepreted as plain text, but this behaviour can be changed with the argument content_type:
content_type='txt'→ Text (default)content_type='md'→ Markdowncontent_type='html'→ HTML
Attachments
You can attach files to the email using attachments argument.
It can contain a single file (path) or a list of file paths to be included as attachments in the email.
Metadata
Release files for easybrevo 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| easybrevo-0.1.2.tar.gz | 3.8 kB | Without provenance | Details for easybrevo-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| easybrevo-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for easybrevo-0.1.2-py3-none-any.whl |
Total release size: 8.5 kB
Release files / easybrevo-0.1.2.tar.gz
| Download URL | easybrevo-0.1.2.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7fb7bd0858aa98a9b7609539d7b3ba24a5e288be01e37e15e0a28ecb39214e18
|
|
BLAKE2b-256 checksum How to use checksums |
7b8c81df22b75dd653baccc22b2540bd56140904363f5a1360abf1f8d25566c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.17
|
Release files / easybrevo-0.1.2-py3-none-any.whl
| Download URL | easybrevo-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dce3e332222eed4a8cef1d543648dbb3f7194fd90781b064ea372869249c1576
|
|
BLAKE2b-256 checksum How to use checksums |
05a7ff4f85d970f182729cf16a9f8735be8a5c881ab1523fc5747ca727f57b1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.17
|
Security for easybrevo 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.