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
Install the cli via pip
pip install odk-mailer
Configuration example
Config location: ~/.env
:
SMTP_HOST=smtp.freesmtpservers.com
SMTP_PORT=25
SMTP_USER=
SMTP_PASS=
NOTIFY_TO=
NOTIFY_FROM=
ODK_HOST=https://your.odk-central.host.tld
Usage
Create and run a new mail job
# Create a new mail job with a unique ID
odk-mailer jobs create
# Run the job by ID
odk-mailer jobs run <job-id>
# Remove a job
odk-mailer jobs delete <job-id>
List mail jobs and evaluate them
# Show all jobs
odk-mailer jobs list
# Run all jobs that are ready to be sent
odk-mailer jobs evaluate
Initiate crontab to periodically evaluate mailjobs and run them directly after
odk-mailer cron init
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.7.1.tar.gz
(17.4 kB
view hashes)
Built Distribution
odk_mailer-0.7.1-py3-none-any.whl
(23.1 kB
view hashes)
Close
Hashes for odk_mailer-0.7.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca6fea474c44295a251af2e1d80779c20c0cede6cff201e790b540b6aadc525b |
|
MD5 | faf8000e773474624529f55b370d667e |
|
BLAKE2b-256 | 77a319d3e514e1adae45c0cb10b1aaed3da1deeacc91c33cc4d615fb67f84135 |