Skip to content

Commit ee063f4

Browse files
committed
make whole game a tad prettier
1 parent c81ea95 commit ee063f4

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

examples/whole_game.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import os
22
from dotenv import load_dotenv
3-
from data_polars import sp500
43
import redmail
54

5+
import sys
6+
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__) + '/..'))
7+
from data_polars import sp500
8+
9+
610
load_dotenv()
711
gmail_address = os.environ["GMAIL_ADDRESS"]
812
gmail_app_password = os.environ["GMAIL_APP_PASSWORD"]
@@ -11,6 +15,22 @@
1115
email_subject = "Report on Cars"
1216
email_body = sp500.head(10).style.as_raw_html(inline_css=True)
1317

18+
intro = """
19+
<div style='font-family: sans-serif; font-size: 1.05em; color: #222; margin-bottom: 1em;'>
20+
<h2 style='color: #0074D9; margin-top: 0;'>Welcome to Your S&P 500 Mini Report!</h2>
21+
<p>Hi there,<br><br>
22+
Here’s a quick look at the latest data from the S&P 500. Explore the table below to see some of the most recent entries and get a feel for the market’s pulse.</p>
23+
</div>
24+
"""
25+
salutation = """
26+
<div style='font-family: sans-serif; font-size: 1em; color: #444; margin-top: 2em;'>
27+
<p>Thanks for reading!<br>Best regards,<br>Jules</p>
28+
</div>
29+
"""
30+
table_html = sp500.head(10).style.as_raw_html(inline_css=True)
31+
32+
email_body = intro + table_html + salutation
33+
1434
# This is here to emphasize the sender does not have to be the same as the receiver
1535
email_receiver = gmail_address
1636

@@ -19,6 +39,6 @@
1939

2040
redmail.gmail.send(
2141
subject=email_subject,
22-
receivers=[email_receiver],
42+
receivers=["jules.walzergoldfeld@posit.co"],
2343
html=email_body,
2444
)

0 commit comments

Comments
 (0)