|
1 | | -# emailer-lib |
| 1 | +# nbmail |
2 | 2 |
|
3 | 3 | <!-- [](https://pypi.python.org/pypi/gt-extras) --> |
4 | 4 | <!-- [](https://pypi.org/project/gt-extras/) --> |
|
11 | 11 | <!-- [](https://github.com/posit-dev/gt-extras/graphs/contributors) --> |
12 | 12 | <!-- [](https://codecov.io/gh/posit-dev/gt-extras) --> |
13 | 13 |
|
14 | | -> ⚠️ **emailer-lib is currently in development, expect breaking changes.** |
| 14 | +> ⚠️ **nbmail is currently in development, expect breaking changes.** |
15 | 15 |
|
16 | 16 |
|
17 | | -### What is [emailer-lib](https://posit-dev.github.io/email-for-data-science/reference/)? |
| 17 | +### What is [nbmail](https://posit-dev.github.io/email-for-data-science/reference/)? |
18 | 18 |
|
19 | | -**emailer-lib** is a Python package for serializing, previewing, and sending email messages in a consistent, simple structure. It provides utilities to convert emails from different sources (Redmail, Yagmail, MJML, Quarto JSON) into a unified intermediate format, and send them via multiple backends (Gmail, SMTP, Mailgun, etc.). |
| 19 | +**nbmail** is a Python package for serializing, previewing, and sending email messages in a consistent, simple structure. It provides utilities to convert emails from different sources (Redmail, Yagmail, MJML, Quarto JSON) into a unified intermediate format, and send them via multiple backends (Gmail, SMTP, Mailgun, etc.). |
20 | 20 |
|
21 | 21 | The package is designed for data science workflows and Quarto projects, making it easy to generate, preview, and deliver rich email content programmatically. |
22 | 22 |
|
23 | 23 | <!-- ## Installation |
24 | 24 | Install the latest release from your local repo or PyPI: |
25 | 25 |
|
26 | 26 | ```bash |
27 | | -pip install -e ./emailer-lib |
| 27 | +pip install -e ./nbmail |
28 | 28 | ``` |
29 | 29 | --> |
30 | 30 |
|
31 | 31 | ## Example Usage |
32 | 32 |
|
33 | 33 | ```python |
34 | | -from emailer_lib import ( |
35 | | - quarto_json_to_intermediate_email, |
36 | | - IntermediateEmail, |
37 | | - send_intermediate_email_with_gmail, |
| 34 | +from nbmail import ( |
| 35 | + quarto_json_to_email, |
| 36 | + Email, |
| 37 | + send_email_with_gmail, |
38 | 38 | ) |
39 | 39 |
|
40 | 40 | # Read a Quarto email JSON file |
41 | | -email_struct = quarto_json_to_intermediate_email("email.json") |
| 41 | +email_struct = quarto_json_to_email("email.json") |
42 | 42 |
|
43 | 43 | # Preview the email as HTML |
44 | 44 | email_struct.write_preview_email("preview.html") |
45 | 45 |
|
46 | 46 | # Send the email via Gmail |
47 | | -send_intermediate_email_with_gmail( "[email protected]", "your_password", email_struct) |
| 47 | +send_email_with_gmail( "[email protected]", "your_password", email_struct) |
48 | 48 | ``` |
49 | 49 |
|
50 | 50 | ## Features |
@@ -81,4 +81,4 @@ url = {https://github.com/posit-dev/gt-extras}, version = {0.0.1} |
81 | 81 | } |
82 | 82 | ``` --> |
83 | 83 |
|
84 | | -For more information, see the [docs](https://posit-dev.github.io/email-for-data-science/reference) or [open an issue](https://github.com/posit-dev/email-for-data-science/issues) with questions or suggestions! |
| 84 | +For more information, see the [docs](https://posit-dev.github.io/email-for-data-science/reference) or [open an issue](https://github.com/posit-dev/email-for-data-science/issues) with questions or suggestions! |
0 commit comments