A simple CLI for sending form related mails in the context of Open Data Kit (ODK)
Project description
ODK Mailer
A simple CLI to send Mails for ODK. Built with Typer and packaged with Poetry.
Requirements
- Python 3
- PIP
Setup
pip install odk-mailer
Usage
# Create a new mail job with a unique ID
odk-mailer create
# Run the job by ID
odk-mailer run <job-id>
# Show all jobs
odk-mailer list
# Run all jobs that are ready to be sent
odk-mailer evaluate
CLI Design
Create
Features > commands
create a mail job
- Read a recipients CSV list, validate input
- Define field from available headers to be used for email sending, validate email addresses
- Read message content from stdin
- Support data templating with format
- Read message content from file
- Add reminders for a mail task, using ODK API, http-lib
- Send mail manually or schedule for the future; smtp, python-crontab
list mail jobs
- Show available mail tasks (that are stored in the local db)
delete mail jobs
- delete mail job by id
check connection
- give instant feedback about connectivity to SMTP and API endpoints
Development
Building a Package - Guide: https://typer.tiangolo.com/tutorial/package/#create-your-app
Requirements
- Python 3.10
- Poetry 1.7
# clone the repo and cd into
poetry shell
poetry install
# Run it with
poetry run odk-mailer
Push to PyPi
poetry build
poetry publish
# requires credentials to be setup: poetry config pypi-token.pypi <my-token>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
odk_mailer-0.1.1.tar.gz
(12.8 kB
view hashes)
Built Distribution
odk_mailer-0.1.1-py3-none-any.whl
(16.5 kB
view hashes)
Close
Hashes for odk_mailer-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03b0d3d6994dfeb2575b25e3a74ce7c5709bc645b8ae6afb1e16ba94a855a978 |
|
MD5 | 5b0417aeb06f348d88fd3ac6986943e2 |
|
BLAKE2b-256 | 83aeea2d8dcd37b561e89c8bcb1d365a25d5fb37172be5d497d5d27f55f4db6d |