===================
.. 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
Metadata
Release files for Flask-Responses 0.2
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 |
|---|---|---|---|---|
| Flask-Responses-0.2.tar.gz | 2.6 kB | Without provenance | Details for Flask-Responses-0.2.tar.gz |
Release files / Flask-Responses-0.2.tar.gz
| Download URL | Flask-Responses-0.2.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a0a30e13e0651b645c89552cd17972664769e351a978b1356ccc806f7a567e2
|
|
BLAKE2b-256 checksum How to use checksums |
5766ab2acb269a04ed3993be29059e2cdb241bdc1ec9318ea976408a33c19043
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for Flask-Responses 0.2
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.