Renuntius
renuntius is a RESTful webservice for sending messages.
Installation
This application was tested, using the following versions:
python==2.7
flask==0.9
flask-restless==0.9.3
flask-sqlalchemy==0.16
Installation with pip
Using pip is probably the easiest way to install renuntius:
pip install renuntius
Local application
In order to run the application, write the following python-code (e.g.: start_renuntius.py):
from renuntius.messaging import flask, db, app, Message db.create_all() manager = flask.ext.restless.APIManager(app, flask_sqlalchemy_db=db) manager.create_api(Message, methods=['GET', 'POST']) app.run(host=localhost, port=5001)
Note: Within the application folder you need a config.py, like:
# Database SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/renuntius.sqlite' SQLALCHEMY_ECHO = True # E-Mail-Server SMTP_SERVER = 'MAILSERVER.DOMAIN.ORG' SMTP_SERVER_PORT = 25 # Messages SERVICE_PREAMBLE = u"This message was automatically generated." FROM_DEFAULT = u'"IT-Renuntius" <renuntius@DOMAIN.ORG>'
Please adjust this config.py to your own settings.
Finally:
python start_renuntius.py
Special use case: PostgreSQL
In order to be able to use a postgresql server, you need to install psycopg2. To install psycopg2 within a virtualenv under linux, do the following:
sudo aptitude install libpq-dev python-dev pip install psycopg2
Example config.py for postgresql (you probably want to specify the SCHEMA!):
# Database SQLALCHEMY_DATABASE_URI = 'postgresql://_ren_admin@ama-prod/mucam' SCHEMA = 'renuntius' SQLALCHEMY_ECHO = False # E-Mail-Server SMTP_SERVER = 'MAILSERVER.DOMAIN.ORG' SMTP_SERVER_PORT = 25 # Messages SERVICE_PREAMBLE = u"This message was automatically generated." FROM_DEFAULT = u'"IT-Renuntius" <renuntius@DOMAIN.ORG>'
Quickstart
Sending an E-Mail via renuntius:
POST http://localhost:5001/api/messages/
{"header_from": "other_service@domain.org",
"header_to": "admins@domain.org",
"header_subject": "Sent by Renuntius",
"content": "Everything works fine!",
"service": "other_service"
}
Note: For firefox use RESTClient add-on to easily POST.
Getting a list of all messages:
GET http://localhost:5001/api/messages/
(Try http://localhost:5001/api/messages/ within your default browser)
Querying for specific messages:
GET http://localhost:5001/api/messages/?q={"filters":[{"name": "header_from", "op": "==", "val":"other_service@domain.org"}]}
For a detailed specification of how to use filters, please look at flask-restless
Copyright License
For information, see the files LICENSE.txt in this directory.
Metadata
Release files for Renuntius 0.1
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 | Actions |
|---|---|---|---|---|
| Renuntius-0.1.tar.gz | 4.3 kB | Without provenance | Details for Renuntius-0.1.tar.gz |
Release files / Renuntius-0.1.tar.gz
| Download URL | Renuntius-0.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aff8460d353d36695ded23cf649989f9f5e2ddfd19bbd16658076a9606ca1a00
|
|
BLAKE2b-256 checksum How to use checksums |
92e04ca090c9953981b459c455821f4bf2ff669a1acf3a3a73276ea5f90c9093
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for Renuntius 0.1
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.