An open API service indexing awesome lists of open source software.

https://github.com/jacobsvante/flask-sendwithus

Forwards-compatible Flask extension to interact with the sendwithus API.
https://github.com/jacobsvante/flask-sendwithus

Last synced: 6 months ago
JSON representation

Forwards-compatible Flask extension to interact with the sendwithus API.

Awesome Lists containing this project

README

          

# Flask-Sendwithus

[![Travis CI build status (Linux)](https://travis-ci.org/jmagnusson/flask-sendwithus.svg?branch=master)](https://travis-ci.org/jmagnusson/flask-sendwithus)
[![PyPI version](https://img.shields.io/pypi/v/Flask-Sendwithus.svg)](https://pypi.python.org/pypi/Flask-Sendwithus/)
[![Downloads from PyPI per month](https://img.shields.io/pypi/dm/Flask-Sendwithus.svg)](https://pypi.python.org/pypi/Flask-Sendwithus/)
[![License](https://img.shields.io/pypi/l/Flask-Sendwithus.svg)](https://pypi.python.org/pypi/Flask-Sendwithus/)
[![Available as wheel](https://img.shields.io/pypi/wheel/Flask-Sendwithus.svg)](https://pypi.python.org/pypi/Flask-Sendwithus/)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/Flask-Sendwithus.svg)](https://pypi.python.org/pypi/Flask-Sendwithus/)
[![PyPI status (alpha/beta/stable)](https://img.shields.io/pypi/status/Flask-Sendwithus.svg)](https://pypi.python.org/pypi/Flask-Sendwithus/)
[![codecov.io](http://codecov.io/github/jmagnusson/flask-sendwithus/coverage.svg?branch=master)](http://codecov.io/github/jmagnusson/flask-sendwithus?branch=master)

## About

Forwards-compatible Flask extension to interact with the [sendwithus](https://www.sendwithus.com/) API.

## Installation

pip install Flask-Sendwithus

## Documentation

Uses the standard extension pattern. Example:

```python
>>> from flask import Flask
>>> from flask_sendwithus import Sendwithus

>>> app = Flask(__name__)
>>> app.config['SENDWITHUS_API_KEY'] = 'YOUR-API-KEY'
>>> sendwithus = Sendwithus()
>>> sendwithus.init_app(app)
>>> r = sendwithus.send(
email_id='YOUR-EMAIL-ID',
recipient={'address': 'us@sendwithus.com'})
>>> print(r.status_code)
200
```

See [the official python client's documentation](https://github.com/sendwithus/sendwithus_python) for further info on what methods are available. All methods found on the `sendwithus.api` instance is proxied on the Flask-Sendwithus's instance.