Implementations of flask response in many formats
Project description
Implementations of flask response in many formats: base64, csv, json, xml, html, yaml.
Based on PyYAML, xmltodict, dicttoxml. See their documentation for other options.
Decorator for http response status 201 CREATED
Decorator for http response status 204 NO_CONTENT
Response based on Accept header of request
Response based on format parameter (query string)
template_or_json: response based on xhr request
Support for case notation checker and converter. See Case class
Quickstart
Install flask_response_builder using pip:
$ pip install Flask-ResponseBuilder
Example usage
For example usage see test.py file in example folder.
Configuration
RB_DEFAULT_ENCODE: (default: utf-8)
RB_DEFAULT_DUMP_INDENT: (default: None)
RB_BASE64_ALTCHARS: (default: None)
RB_BASE64_CONTENT_TYPE: (default: text/plain)
RB_HTML_DEFAULT_TEMPLATE: (default: None)
RB_YAML_ALLOW_UNICODE: (default: True)
RB_CSV_DEFAULT_NAME: (default: filename)
RB_CSV_QUOTING: (default: False)
RB_CSV_DELIMITER: (default: ;)
RB_CSV_QUOTING_CHAR: (default: “)
RB_CSV_DIALECT: (default: excel-tab)
RB_XML_CDATA: (default: False)
RB_XML_ROOT: (default: root)
RB_DEFAULT_RESPONSE_FORMAT: (default: application/json)
License MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file Flask-ResponseBuilder-1.1.0.tar.gz
.
File metadata
- Download URL: Flask-ResponseBuilder-1.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d310886f4ba4de05917c22fe9bda59faa956941a16bdcbe204e5c21f3b2e5986 |
|
MD5 | c0737c6690b15de405f17cbfd214e6b5 |
|
BLAKE2b-256 | 43dfdd872c1a63153f67a3a40f1ae79c3d8a0963652c6912488aa5a69ec3c151 |
File details
Details for the file Flask_ResponseBuilder-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: Flask_ResponseBuilder-1.1.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cdd0a991d01a3378c8ff40375e5493ef79e9b0cc509cf0251d7c6e762fe8bf2 |
|
MD5 | ae151f976d6592107fdfc02f9c11ac69 |
|
BLAKE2b-256 | 2e1ef2dd41e29498780dcffd08734e7432736fd4d5373a8e2a8e4ed5dbfb04ca |