Compare commits

...

2 Commits

Author SHA1 Message Date
grillazz
63b9c90290 fix README.md links 2025-01-28 20:18:32 +01:00
grillazz
daae24dd71 add smtp docs 2025-01-28 20:08:30 +01:00
3 changed files with 23 additions and 2 deletions

4
.env
View File

@ -16,5 +16,9 @@ REDIS_DB=2
JWT_EXPIRE=3600
JWT_ALGORITHM=HS256
# SMTP
EMAIL_HOST=
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=

1
.gitignore vendored
View File

@ -128,3 +128,4 @@ dmypy.json
# Pyre type checker
.pyre/
/requirements-dev.txt
/.env.smtp

View File

@ -29,6 +29,7 @@
<li><a href="#local-development-with-poetry">Local development with poetry</a></li>
<li><a href="#import-xlsx-files-with-polars-and-calamine">Import xlsx files with polars and calamine</a></li>
<li><a href="#worker-aware-async-scheduler">Schedule jobs</a></li>
<li><a href="#smtp-setup">Email Configuration</a></li>
</ul>
</li>
<li><a href="#acknowledgments">Acknowledgments</a></li>
@ -143,13 +144,27 @@ In `pl.read_excel()` “calamine” engine can be used for reading all major typ
<p align="right">(<a href="#readme-top">back to top</a>)</p>
### Worker aware async scheduler :clock1:
### Worker aware async scheduler
The project uses the APScheduler library to schedule tasks in the background.
The APScheduler library is a powerful and flexible in-process task scheduler with Cron-like capabilities.
It allows you to schedule jobs to run at specific times or intervals, and it supports multiple job stores, triggers, and executors.
The library is designed to be easy to use and highly configurable, making it suitable for a wide range of use cases.
It was added to project in version 4.0.0a5 with Redis as event broker and SQLAlchemy as data store.
<p align="right">(<a href="#readme-top">back to top</a>)</p>
### SMTP setup
The project uses the `smtplib` library to send emails.
The `smtplib` library is a built-in Python library that provides a simple interface for sending emails using the Simple Mail Transfer Protocol (SMTP).
It allows you to connect to an SMTP server, send an email message, and disconnect from the server.
The library is easy to use and provides a flexible and powerful way to send emails from your Python applications.
SMTPEmailService provides a reusable interface to send emails via an SMTP server.
This service supports plaintext and HTML emails, and also allows sending template-based emails using the Jinja2 template engine.
It is implemented as a singleton to ensure that only one SMTP connection is maintained
throughout the application lifecycle, optimizing resource usage.
<p align="right">(<a href="#readme-top">back to top</a>)</p>
## Acknowledgments
@ -188,8 +203,9 @@ I've included a few of my favorites to kick things off!
- **[MAR 15 2024]** add polars and calamine to project :heart_eyes_cat:
- **[JUN 8 2024]** implement asyncpg connection pool :fast_forward:
- **[AUG 17 2024]** granian use case implemented with docker compose and rich logger :fast_forward:
- **[OCT 16 2024]** apscheduler added to project :fast_forward:
- **[OCT 16 2024]** apscheduler added to project :clock1:
- **[DEC 16 2024]** bump project to Python 3.13 :fast_forward:
- **[JAN 28 2025]** add SMTP setup :email:
<p align="right">(<a href="#readme-top">back to top</a>)</p>