All Projects → skozlovf → Flask Json

skozlovf / Flask Json

Licence: other
Flask-JSON is a Flask extension providing better JSON support.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Flask Json

Flask Htmlmin
Flask html response minifier
Stars: ✭ 66 (+94.12%)
Mutual labels:  flask, flask-extensions
Flask simplelogin
Simple Login - Login Extension for Flask - maintainer @cuducos
Stars: ✭ 133 (+291.18%)
Mutual labels:  flask, flask-extensions
Flask Mobility
A Flask extension to simplify building mobile-friendly sites.
Stars: ✭ 68 (+100%)
Mutual labels:  flask, flask-extensions
Flask Apidoc
Adds ApiDoc support to Flask
Stars: ✭ 49 (+44.12%)
Mutual labels:  flask, flask-extensions
Potion
Flask-Potion is a RESTful API framework for Flask and SQLAlchemy, Peewee or MongoEngine
Stars: ✭ 484 (+1323.53%)
Mutual labels:  flask, flask-extensions
Flask And Redis
Simple as dead support of Redis database for Flask applications
Stars: ✭ 76 (+123.53%)
Mutual labels:  flask, flask-extensions
Dynaconf
Configuration Management for Python ⚙
Stars: ✭ 2,082 (+6023.53%)
Mutual labels:  flask, flask-extensions
Flask Ask
Alexa Skills Kit for Python
Stars: ✭ 1,877 (+5420.59%)
Mutual labels:  flask, flask-extensions
Flasgger
Easy OpenAPI specs and Swagger UI for your Flask API
Stars: ✭ 2,825 (+8208.82%)
Mutual labels:  flask, flask-extensions
Flask Jsonrpc
A basic JSON-RPC implementation for your Flask-powered sites
Stars: ✭ 223 (+555.88%)
Mutual labels:  flask, flask-extensions
Flask Blogging
A Markdown Based Python Blog Engine as a Flask Extension.
Stars: ✭ 609 (+1691.18%)
Mutual labels:  flask, flask-extensions
Flask Googlemaps
Easy way to add GoogleMaps to Flask applications. maintainer: @RiverFount
Stars: ✭ 550 (+1517.65%)
Mutual labels:  flask, flask-extensions
Flask Apscheduler
Adds APScheduler support to Flask
Stars: ✭ 741 (+2079.41%)
Mutual labels:  flask, flask-extensions
Neurodo
A web tool for the analysis of cognitive dysfunction in patient journaling during Schizophrenia clinical drug trials
Stars: ✭ 14 (-58.82%)
Mutual labels:  flask
Corpus Christi
Church management suite, open source, fully internationalized
Stars: ✭ 29 (-14.71%)
Mutual labels:  flask
System dashboard
Boilerplate project - Cross-Platform System Dashboard using Flask, React, Mobx and Web-Workers
Stars: ✭ 13 (-61.76%)
Mutual labels:  flask
Os
This is the software framework for an OPSORO robot, to be used in conjunction with Ono2 or OPSORO grid and OPSOROHAT.
Stars: ✭ 11 (-67.65%)
Mutual labels:  flask
Cancer Donation Portal Python Flask App
Flask App for Cancer Donation Portal using basic Python, SQLite3, HTML, CSS and Javascript
Stars: ✭ 32 (-5.88%)
Mutual labels:  flask
P2p
一个基于 python 的 flask 框架的资讯网站, http://119.29.100.53:8086/
Stars: ✭ 28 (-17.65%)
Mutual labels:  flask
Keras Flask Deploy Webapp
😺 Pretty & simple image classifier app template. Deploy your own trained model or pre-trained model (VGG, ResNet, Densenet) to a web app using Flask in 10 minutes.
Stars: ✭ 856 (+2417.65%)
Mutual labels:  flask

Flask-JSON

.. image:: https://travis-ci.org/skozlovf/flask-json.png?branch=master :target: https://travis-ci.org/skozlovf/flask-json

Flask-JSON is a simple extension that adds better JSON support to Flask application.

Features:

  • Works on python 2.6, 2.7, 3.3+ and Flask 0.10+.
  • More ways to generate JSON responses (comparing to plain Flask).
  • Extended JSON encoding support.

Usage

Here is fast example:

.. code-block:: python

from datetime import datetime
from flask import Flask
from flask_json import FlaskJSON, JsonError, json_response, as_json

app = Flask(__name__)
FlaskJSON(app)


@app.route('/get_time')
def get_time():
    return json_response(time=datetime.utcnow())


@app.route('/get_time_and_value')
@as_json
def get_time_and_value():
    return dict(time=datetime.utcnow(), value=12)


@app.route('/raise_error')
def raise_error():
    raise JsonError(description='Example text.', code=123)


if __name__ == '__main__':
    app.run()

Responses:

.. code-block:: json

GET /get_time HTTP/1.1

HTTP/1.0 200 OK
Content-Type: application/json
Content-Length: 60

{
  "status": 200,
  "time": "2015-04-14T13:17:16.732000"
}

.. code-block:: json

GET /raise_error HTTP/1.1

HTTP/1.0 400 BAD REQUEST
Content-Type: application/json
Content-Length: 70

{
  "code": 123,
  "description": "Example text.",
  "status": 400
}

Documentation

Documentation is available on Read the Docs <http://flask-json.readthedocs.io>_.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].