From 1ae7139f58ff42080e7a013ffb5a1830daac195d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Wed, 30 Jun 2021 16:46:15 +0200 Subject: [PATCH] fix travis --- README.md | 21 ++++++++++++++++++++- setup.cfg | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 82ef322..6e3e217 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,13 @@ -# flask-minijson +flask-minijson +============== + +[](https://travis-ci.com/Dronehub/flask-minijson) +[](https://codeclimate.com/github/Dronehub/flask-minijson/test_coverage) +[](https://codeclimate.com/github/Dronehub/flask-minijson) +[](https://pypi.python.org/pypi/flask-minijson) +[](https://badge.fury.io/py/flask-minijson) +[](https://pypi.python.org/pypi/flask-minijson) + An extension for Flask to allow clients to submit data using the application/minijson codec flask-json is required to be initialized before `FlaskMiniJSON`, in such a way: @@ -10,3 +19,13 @@ 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 diff --git a/setup.cfg b/setup.cfg index 349e494..b8e965c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ # coding: utf-8 [metadata] -version = 2.5a1 +version = 0.1 name = flask-minijson long_description = file: README.md long_description_content_type = text/markdown; charset=UTF-8 -- GitLab