A really lightweight and simple API server, built on the socketserver module
Project description
meager
meager is a tiny web framework built on the socketserver module in python
Examples
This is the simplest way of using meager, returning html upon a request to "/".
The module is heavily inspired by flask, and it's ease of use, and readability.
Example returning html
import meager
app = meager.Server()
@app.router.route("/")
def index(request):
return "<h1>Hello world!</h1>"
Example returning JSON
import meager
app = meager.Server()
example_dict = {"key1": "val1", "key2": "val2"}
@app.router.route("/")
def index(request):
return example_dict # It can detect if you're sending a dictionary
# and automatically changes the "Content-Type:" header to application/json
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
meager-0.0.2.tar.gz
(2.6 kB
view hashes)
Built Distribution
meager-0.0.2-py3-none-any.whl
(17.8 kB
view hashes)