semvec/pypi-packages huggingface dataset:
django-email-interceptor 0.1
Simple backend to intercept emails during development
License: MIT

=================
Email Interceptor
=================

Django email interceptor provides email backends to intercept outgoing mail and mail them to a specified email instead.

-------

|python| |pypi| |license| |travis| |django|

-------

Quickstart
==========

Install via pip

.. code-block:: bash

    pip install django-email-interceptor

Add to installed apps:

.. code-block:: python

    INSTALLED_APPS = (
        ...
        'email_interceptor',
        ...
    )

Change the email backend to use interceptor and set an email to send the intercepted mail to:

.. code-block:: python

    EMAIL_BACKEND = 'email_interceptor.backends.SmtpInterceptorBackend'

    INTERCEPTOR_EMAIL = 'test@example.com'

Testing
=======

To run tests, install the requirements for testing and run!

.. code-block:: bash
    
    pip install -r requirements/test.txt
    python runtests.py


.. |python| image:: https://img.shields.io/pypi/v/django-email-interceptor.svg?style=flat-square
    :target: https://pypi.python.org/pypi/django-email-interceptor/
    :alt: Supported Python versions

.. |pypi| image:: https://img.shields.io/pypi/pyversions/django-email-interceptor.svg?style=flat-square
    :target: https://pypi.python.org/pypi/django-email-interceptor/
    :alt: Latest Version

.. |license| image:: https://img.shields.io/pypi/l/django-email-interceptor.svg?style=flat-square
    :target: https://pypi.python.org/pypi/django-email-interceptor/
    :alt: License

.. |travis| image:: https://img.shields.io/travis/Brobin/django-email-interceptor.svg?style=flat-square
    :target: https://travis-ci.org/Brobin/django-email-interceptor/
    :alt: Travis CI

.. |django| image:: https://img.shields.io/badge/Django-1.8, 1.9-orange.svg?style=flat-square
    :target: http://djangoproject.com/
    :alt: Django 1.7, 1.8
peace 0.0.8
REST client
License: MIT
Keywords: rest client

Peace
=====

A REST client - inspired by restmod for javascript.

Test status
-----------

|Codeship Status for garymonson/peace|

Quick start for contributing
----------------------------

::

    virtualenv -p `which python3` virtualenv
    source virtualenv/bin/activate
    pip install -r requirements.txt
    pip install -r dev_requirements.txt
    nosetests

Usage
-----

::

    from peace import PeaceMaker

    def set_authorization_header(request):
        request.headers['Authorization'] = authorization_value
        return request

    maker = PeaceMaker('http://api.example.com')
    Employee = maker.make(
        'Employee',
        '/employees'
        has: {
            'user': maker.make('Company'),
        },
        intercept: set_authorization_header,
    )

    employees = Employee.search(last_name='Smith')
    bob = Employee.get('100')
    bob.last_name = 'Smith-Jones'
    bob.save()
    bob.refresh()
    company = bob.company
    print(company.name) # prints name

Peace requires the REST API to conform to a particular structure. A JSON
response should look something like this:

::

    {
      "data": {
        "id": 100,
        "first_name": "Bob",
        "last_name": "Smith",
      },
      "links": {
        "self": {"href": "/employees/100"},
        "company": {
          "href": "/companies/5",
          "data": {
            "name": "Big Corp",
          },
        },
      },
    }

Links can be followed (e.g. bob.company). Initially, the data returned
in the original request will be immediately available, but if you try to
access other fields that a direct load is required to make available,
(i.e. were not in the original response), then a load of the linked
object will be done first (e.g. GET /companies/5).

.. |Codeship Status for garymonson/peace| image:: https://codeship.com/projects/3308e5a0-b522-0133-3191-1af10c27659b/status?branch=master
   :target: https://codeship.com/projects/134053