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
- cron
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=
CRON_FREQUENCY=15
NOTIFY_TO=foo@bar.com,faz@baz.com
NOTIFY_FROM=odk-mailer@freesmtpservers.com
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file odk_mailer-0.7.3.tar.gz.
File metadata
- Download URL: odk_mailer-0.7.3.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/5.15.133.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e8ac98dd6aa72e62f1ad46a310be1a524748f15cad513b983a98a89a3b5433a
|
|
| MD5 |
682fb76e4cb6bb600bea60491b47845f
|
|
| BLAKE2b-256 |
ab490946f1c77c855295d8e51e6f2f798d4ca447360772308315f6fd4259486c
|
File details
Details for the file odk_mailer-0.7.3-py3-none-any.whl.
File metadata
- Download URL: odk_mailer-0.7.3-py3-none-any.whl
- Upload date:
- Size: 23.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/5.15.133.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dace2e67d4144a7e06133299d4084993b92b4890d92f357b48df78d6f2cb402
|
|
| MD5 |
375ee8c466881f08566539eba6a58578
|
|
| BLAKE2b-256 |
053f6dad5b0f2d69fe49ccfd91c240aadf95c71d803b91fb347b92b0ee947f2f
|