A small wrapper for flask app to ease the endpoints creation
Project description
A small wrapper for flask app to ease the endpoints creation
Motivation
We have been using Flask-RESTful for most of our project for the past couple of years, and when we mapped exactly what we need from it, it was mostly the way it allows the user to add routing.
This small module replace for us this functionality, so I’ve desided to share it with whoever want to give it a try :wink:
Getting Started
This wrapper helps davide the Flask App into modules and to use Class handlers instead of functions for views
Prerequisites
The only requirement for this project is Flask
Usage
from flask import Flask
from flask_api_handler import ApiHandler
form example import UserHandler
form example import PaymentHandler
app = Flask(__name__)
# Init the api handler
api = ApiHandler(app)
# Add the endpoints
api.add_handler('/user', UserHandler)
api.add_handler('/payment', PaymentHandler)
TODO
Make pip installable
Add tests
Project details
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-api-handler-0.1.3.tar.gz
.
File metadata
- Download URL: flask-api-handler-0.1.3.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf0a9c52a96c17acfdf84dd3c4702ff0a4be875b3cb358a64e1533ab8465255b |
|
MD5 | 99ef2494e0b3b138caefd68fb0a6afe9 |
|
BLAKE2b-256 | c9e3d2cb397ca9b50cd84bebcd99f84228bfde79da13337b41bc1b9c9d52b521 |
File details
Details for the file flask_api_handler-0.1.3-py2-none-any.whl
.
File metadata
- Download URL: flask_api_handler-0.1.3-py2-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73df52f377c6ba4b8e7d5d8fd8e1bdb72ec4520a67482671d79cd911ea353dba |
|
MD5 | b4923c3f774b88c15d957d6b4c7c3a2c |
|
BLAKE2b-256 | a0e9589aefa5c713e25f5a31146d55e2ca40ece1f5152689aac9105f963972bb |