Plantain
A commandline tool for managing the lifecycle of Mandrill templates.
In short, plantain allows the user to manage their Mandril email templates from the commandline, perhaps as part of their configuration management system (eg Salt, Ansible, cfengine, Chef, Puppet, etc).
Install
$ pip install plantain
or:
$ sudo python setup.py install
Notes
Note: Plantain used to be called banana, until it turned out that someone else already had banana in the cheese shop! For backward comparability plantain installs a plantain and for legacy support, a banana binary.
Setup
plantain expects each template to consist of three files: an HTML file (.html) for the HTML fork of the email to be sent, a text file (.txt) for the text fork, and a configfile (.cfg) for the metadata aspects of the template (sending address, Subject: header etc). eg:
account_expired.cfg account_expired.html account_expired.txt
A sample configfile might read:
from_name = YourCompany from_email = robot@yourcompany.com subject = Account Expiration
The keys in the configfile match the keys used by the Mandrill API: https://mandrillapp.com/api/docs/
Note that for fields which are lists, such as labels, you must put a comma after the first item if there’s only one item in the list for it to be recognised as a list (otherwise the list is the list of characters in the token):
labels = foo,
Usage
$ plantain -h
usage: plantain [-h] -k KEY -t TEMPLATE -a ACTION [-p] [-q] [-v]
Manage and deploy Mandrill templates.
optional arguments:
-h, --help show this help message and exit
-k KEY, --key KEY Mandrill API key.
-t TEMPLATE, --template TEMPLATE
Template to manipulate.
-a ACTION, --action ACTION
Action to perform: ['addinfo', 'update',
'publish', 'delete', 'list', 'time_series']
-p, --publish Auto-publish (for add and update).
-q, --quiet Suppress normal output.
-v, --verbose Output results and operations.
Examples
Example call to add a new template to Mandrill called “foo_bar”:
$ plantain -k AbbbcdeDeAdBeeFGaFFPA -t foo_bar -a add
Note that this will not “publish” the template. To do that:
$ plantain -k AbbbcdeDeAdBeeFGaFFPA -t foo_bar -a publish
Or you can publish at the same time you add or update the template:
$ plantain -k AbbbcdeDeAdBeeFGaFFPA -t foo_bar -a update -p
Metadata
Release files for plantain 0.2.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| plantain-0.2.post1.tar.gz | 55.7 kB | Without provenance | Details |
Release files / plantain-0.2.post1.tar.gz
| Download URL | plantain-0.2.post1.tar.gz |
|---|---|
| Size | 55.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
472afed6356c4c066b1e0d50eb1bb215756f5db57bf9326a275296ebba93ab9c
|
|
BLAKE2b-256 checksum How to use checksums |
187caa3915150f6650d11b57e4342ed0c64de9ac55c8067e9f3a650d4329de23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for plantain 0.2.post1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.