Middleware for Falcon web framework to browse JSON API in HTML
Project description
This project provides a middleware for Falcon Web Framework that will render the response in an HTML form for documentation purpose. It uses the docstring from the Resource object and all the supported HTTP methods for the resource.
It is inspired by Django Rest Framework’s Browsable API and is written using jinja2 templating language.
Installing
This project is currently in early stages of development. Once it is stable enough to be used by other projects, it will be provided via PyPI.
pip install git+https://github.com/maxking/falcon-api-browse
Using
Since this is a middleware for Falcon, you can use it by passing an initialized instance during Falcon App creation.
from falcon import App from falcon_api_browse import HTMLResponseMiddleware app = App(middleware=HTMLResponseMiddleware())
Examples
There are some runnable examples in examples/ directory.
LICENSE
This project and contents of this repo are licensed under Apache 2.0 License.
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 falcon_api_browse-0.1.1.tar.gz
.
File metadata
- Download URL: falcon_api_browse-0.1.1.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e8589ccaa0a5d5a2380ae020696be7fa8e267d3893a6be446f53b9315b3b91c |
|
MD5 | b2fc66328fbfff7fe520008f49b5004b |
|
BLAKE2b-256 | b58f8986f94fbe4cd73ed746177e94c3c7b77ebd0683259f98c4c918afe74105 |
File details
Details for the file falcon_api_browse-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: falcon_api_browse-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac84a98929abc2ac58cc3a2f9ee2c243437cab3a96f5aa72daba6d30d1252e53 |
|
MD5 | 748532f27392e9bfad216a9441fa2027 |
|
BLAKE2b-256 | 69063f42e582e80d5f4eabdf2782b7bf58928187fc17e8b569412a44d9905e99 |