Skip to main content

Dead simple restful wsgi applications

Project description

# dsrw
Dead simple restful wsgi applications

# Installation

```pip install dsrw```

# Usage

from wsgiref.simple_server import make_server
from dsrw import App, Request

app = App()
api = app.ns('/api')

def hello(req: Request):
return {'msg': "Hello world!"}

def other(req: Request):
return {'msg': 'Hello',

def echo(req: Request):
if req.has_valid_body:
return req.body
return ["No body available"]

if __name__ == '__main__':
httpd = make_server('', 8080, app)
print("Serving HTTP on port 8080...")

# Respond to requests until process is killed


# Todo
- Middleware

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

dsrw-0.1.4.tar.gz (4.9 kB view hashes)

Uploaded source

Built Distribution

dsrw-0.1.4-py3-none-any.whl (6.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page