Skip to main content

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

This version

0.0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for flamingo-server, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size flamingo_server-0.0.2-py3-none-any.whl (6.3 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size flamingo-server-0.0.2.tar.gz (4.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page