semvec/pypi-packages huggingface dataset:
Flask-Responses 0.2
Simple response utility for Flask
License: BSD

Flask-Responses 0.2
===================

.. image:: https://pypip.in/version/flask-responses/badge.svg
    :target: https://pypi.python.org/pypi/flask-responses/
    :alt: Latest Version

.. image:: https://secure.travis-ci.org/Parkayun/flask-responses.svg?branch=master
   :alt: Build Status
   :target: https://travis-ci.org/Parkayun/flask-responses

.. image:: https://img.shields.io/coveralls/Parkayun/flask-responses.svg
   :alt: Coverage Status
   :target: https://coveralls.io/r/Parkayun/flask-responses

.. module:: flask.ext.responses

Simple response utility for `Flask`.

.. _Flask: http://flask.pocoo.org/

Installation
-------------

.. sourcecode:: bash

   ~ $ python setup.py install
   
or can use pip

.. sourcecode:: bash

   ~ $ pip install flask-responses

Quick start
-----------

.. sourcecode:: python

   from flask import Flask
   from flask.ext.responses import json_response, xml_response, auto_response

   app = Flask(__name__)

   @app.route("/json")
   def hello():
       return json_response({"message": "Hello World!"}, status_code=201)
       
   @app.route("/xml")
   def world():
      return xml_response({"message": "Hello World!"}, headers={'x-foo': 'bar'}) # or can do this xml_response('<message>Hello World</message>')
      
   @app.route("/auto")
   def auto():
      return auto_response({"message": "Hello World!"}, status_code=201, headers={'x-foo': 'bar'})
       
Responses
---------
* JSON (json_response)
* XML (xml_response)

ToDo
----
* allow origin cross domain
* server sent evnets
django-basic-email 0.0.2
Django Basic Email application
License: BSD

==================
django-basic-email
==================

.. image:: https://pypip.in/version/django-basic-email/badge.svg
    :target: https://pypi.python.org/pypi/django-basic-email/
    :alt: Latest Version

.. image:: https://pypip.in/py_versions/django-basic-email/badge.svg
    :target: https://pypi.python.org/pypi/django-basic-email/
    :alt: Supported Python versions

.. image:: https://travis-ci.org/ArabellaTech/django-basic-email.svg
    :target: https://travis-ci.org/ArabellaTech/django-basic-email

.. image:: https://coveralls.io/repos/ArabellaTech/django-basic-email/badge.svg
    :target: https://coveralls.io/r/ArabellaTech/django-basic-email

.. image:: https://requires.io/github/ArabellaTech/django-basic-email/requirements.svg?branch=master
     :target: https://requires.io/github/ArabellaTech/django-basic-email/requirements/?branch=master
     :alt: Requirements Status

This Django Basic Email enable you to create emails in easy way.

This CMS is know to work on Django 1.4+ with Python 2.6+ and 3.3+

Instalation
===========

Get package or install by pip::

    pip install django-basic-email


Configuration
=============

Modify your ``settings.py``. Add ``'basic_email'`` to your
``INSTALLED_APPS`` like this:

.. code-block:: python

    INSTALLED_APPS = (
        ...
        'basic_email',
    )

Usage
=====

Create template ``emails/email_example.html`` and send email:

.. code-block:: python

    from basic_email.send import send_email
    send_email('example', 'joe@doe.com', 'Hello')

Options:
 - ``template`` template name from scheme ``emails/email_<name>.html``
 - ``email`` - receiver email
 - ``subject`` - subject email
 - ``variables`` - dict with variables to pass to template render
 - ``fail_silently`` - flag if error in sending email should raise (default ``False``)
 - ``replace_variables`` - dict with variables to replace in template
 - ``reply_to`` - reply_to header
 - ``attachments`` - attachments list (file objects)
 - ``memory_attachments`` - attachments list (string objects)


Testing
=======

1. Fork repository (if you don't have write permission).
2. Create a branch.
3. Add feature or fix a bug.
4. Push code.
5. Create a Pull Request.


Automated tests
---------------

Require Tox>=1.8

Testing all platforms

::

    tox

Testing one platforms

::

    tox -e <platform>

Example:

::

    tox -e py27-django-17

Testing interface
-----------------

1. Create virtual environment::

    # Preparing virtualenv paths (optional if your profile doesn't have it).
    export WORKON_HOME=~/Envs
    source /usr/bin/virtualenvwrapper_lazy.sh
    # or: source /usr/local/bin/virtualenvwrapper_lazy.sh

    # Start by creating a virtual environment using the helper scripts provided. Do not include the systems site-packages.
    mkvirtualenv django-basic-email --no-site-packages
    workon django-basic-email

2. Install ``django-basic-email`` in editable mode::

    pip install -e .

3. Run example project::

    cd example_project && ./manage.py migrate && ./manage.py runserver