flask-minijson
==============
[![Build Status](https://travis-ci.com/Dronehub/flask-minijson.svg)](https://travis-ci.com/Dronehub/flask-minijson)
[![Test Coverage](https://api.codeclimate.com/v1/badges/34b392b61482d98ad3f0/test_coverage)](https://codeclimate.com/github/Dronehub/flask-minijson/test_coverage)
[![Issue Count](https://codeclimate.com/github/Dronehub/flask-minijson/badges/issue_count.svg)](https://codeclimate.com/github/Dronehub/flask-minijson)
[![PyPI](https://img.shields.io/pypi/pyversions/flask-minijson.svg)](https://pypi.python.org/pypi/flask-minijson)
[![PyPI version](https://badge.fury.io/py/flask-minijson.svg)](https://badge.fury.io/py/flask-minijson)
[![PyPI](https://img.shields.io/pypi/implementation/flask-minijson.svg)](https://pypi.python.org/pypi/flask-minijson)
[![PyPI](https://img.shields.io/pypi/wheel/flask-minijson.svg)]()
[![License](https://img.shields.io/pypi/l/flask-minijson)](https://github.com/Dronehub/flask-minijson)
An extension for Flask to allow clients to submit data using the
[minijson](https://github.com/Dronehub/minijson) codec by providing
a `Content-Type` header of `application/minijson`.
flask-json is required to be initialized before `FlaskMiniJSON`, in such a way:
```python
from flask_minijson import FlaskMiniJSON
app = Flask(__name__)
FlaskJSON(app)
FlaskMiniJSON(app)
```
And you use it like this:
```python
@app.route('/v1', methods=['POST'])
def endpoint():
json = request.get_json()
```
if normal JSON is passed, it will be recognized. If
minijson is sent by the client, it will be recognized as well.
Raw data
{
"_id": null,
"home_page": "https://github.com/Dronehub/flask-minijson",
"name": "flask-minijson",
"maintainer": null,
"docs_url": null,
"requires_python": "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*",
"maintainer_email": null,
"keywords": null,
"author": "Piotr Ma\u015blanka",
"author_email": "pmaslanka@smok.co",
"download_url": "https://files.pythonhosted.org/packages/a5/50/8335e142c189d628ca043358eab24eabc822eb7eb05901b26d818fe7ade3/flask-minijson-0.4.tar.gz",
"platform": null,
"description": "flask-minijson\r\n==============\r\n\r\n[![Build Status](https://travis-ci.com/Dronehub/flask-minijson.svg)](https://travis-ci.com/Dronehub/flask-minijson)\r\n[![Test Coverage](https://api.codeclimate.com/v1/badges/34b392b61482d98ad3f0/test_coverage)](https://codeclimate.com/github/Dronehub/flask-minijson/test_coverage)\r\n[![Issue Count](https://codeclimate.com/github/Dronehub/flask-minijson/badges/issue_count.svg)](https://codeclimate.com/github/Dronehub/flask-minijson)\r\n[![PyPI](https://img.shields.io/pypi/pyversions/flask-minijson.svg)](https://pypi.python.org/pypi/flask-minijson)\r\n[![PyPI version](https://badge.fury.io/py/flask-minijson.svg)](https://badge.fury.io/py/flask-minijson)\r\n[![PyPI](https://img.shields.io/pypi/implementation/flask-minijson.svg)](https://pypi.python.org/pypi/flask-minijson)\r\n[![PyPI](https://img.shields.io/pypi/wheel/flask-minijson.svg)]()\r\n[![License](https://img.shields.io/pypi/l/flask-minijson)](https://github.com/Dronehub/flask-minijson)\r\n\r\nAn extension for Flask to allow clients to submit data using the\r\n[minijson](https://github.com/Dronehub/minijson) codec by providing\r\na `Content-Type` header of `application/minijson`.\r\n\r\nflask-json is required to be initialized before `FlaskMiniJSON`, in such a way:\r\n\r\n```python\r\nfrom flask_minijson import FlaskMiniJSON\r\n\r\napp = Flask(__name__)\r\nFlaskJSON(app)\r\nFlaskMiniJSON(app)\r\n```\r\n\r\nAnd you use it like this:\r\n\r\n```python\r\n@app.route('/v1', methods=['POST'])\r\ndef endpoint():\r\n json = request.get_json()\r\n```\r\n\r\nif normal JSON is passed, it will be recognized. If\r\nminijson is sent by the client, it will be recognized as well.\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A Flask extension to allow client's to submit data using the MiniJSON codec",
"version": "0.4",
"project_urls": {
"Code": "https://github.com/Dronehub/flask-minijson",
"Homepage": "https://github.com/Dronehub/flask-minijson",
"Issue tracker": "https://github.com/Dronehub/flask-minijson/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e8508aaf0a4f66f49390028a9ec76084e279846e03ba01f4e10ab06167163bbb",
"md5": "2f5c2bca71586cfc5b2a275dc769bd8f",
"sha256": "1aee2bec1e8e51e39369c4d58c35e676a9b0f9479639e9b3e2ec60f573c3c73a"
},
"downloads": -1,
"filename": "flask_minijson-0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2f5c2bca71586cfc5b2a275dc769bd8f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*",
"size": 3548,
"upload_time": "2024-04-05T08:10:05",
"upload_time_iso_8601": "2024-04-05T08:10:05.341870Z",
"url": "https://files.pythonhosted.org/packages/e8/50/8aaf0a4f66f49390028a9ec76084e279846e03ba01f4e10ab06167163bbb/flask_minijson-0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a5508335e142c189d628ca043358eab24eabc822eb7eb05901b26d818fe7ade3",
"md5": "44a1ed2dc316e19bc6f540b1069e8d00",
"sha256": "286688303924d7daaa16f8ee773366cb71209be8202a107e590348b59bf3d2bc"
},
"downloads": -1,
"filename": "flask-minijson-0.4.tar.gz",
"has_sig": false,
"md5_digest": "44a1ed2dc316e19bc6f540b1069e8d00",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*",
"size": 3638,
"upload_time": "2024-04-05T08:10:06",
"upload_time_iso_8601": "2024-04-05T08:10:06.467997Z",
"url": "https://files.pythonhosted.org/packages/a5/50/8335e142c189d628ca043358eab24eabc822eb7eb05901b26d818fe7ade3/flask-minijson-0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-05 08:10:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Dronehub",
"github_project": "flask-minijson",
"travis_ci": true,
"coveralls": true,
"github_actions": false,
"requirements": [
{
"name": "flask",
"specs": []
},
{
"name": "flask-json",
"specs": []
},
{
"name": "minijson",
"specs": []
}
],
"lcname": "flask-minijson"
}