A lightweight customizable socket server.
Project description
Flamingo
Installing
pip install flamingo
Example
simple http server
import json
from flamingo import Flamingo, Response
app = Flamingo()
def homepage():
return "Hello world"
app.register("/", homepage)
app.register("/text", "this is just a line of text")
data = json.dumps({"code":200, "msg":"hello world"})
app.register("/json", Response(200, data, content_type="application/json"))
app.run()
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
flamingo-server-0.0.2.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for flamingo_server-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba937a21d51e963add02a849fe489e50276f579b68492cbebb9c807eab11eb42 |
|
MD5 | 1e80962c26fba04ecd69ec742438d671 |
|
BLAKE2b-256 | b5018500ca41cb764618d3f12bd04ce623ff875b61283c09722aa527feb3276b |