Skip to main content
# dsrw
Dead simple restful wsgi applications

# Installation

```pip install dsrw```

# Usage

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

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

@app.get('/hello')
def hello(req: Request):
return {'msg': "Hello world!"}


@app.get('/hello/:name')
def other(req: Request):
return {'msg': 'Hello',
'name': req.param.name}


@api.get('/echo')
def echo(req: Request):
if req.has_valid_body:
return req.body
else:
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
httpd.serve_forever()

```

# Todo
- Middleware


Metadata

Release files for dsrw 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dsrw 0.1.4
File Size Uploaded
dsrw-0.1.4.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dsrw 0.1.4
File Interpreter ABI Platform
dsrw-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 11.8 kB

Release files / dsrw-0.1.4.tar.gz

Download URL dsrw-0.1.4.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4c0ef48228cd4c9d0dd216a3bbc75220d8bf9e4bd49c9e1b518bf3b2049e6ce3
BLAKE2b-256 checksum
How to use checksums
cd55ba0c3ffd8de6c21f6fb14bd2e86d427ff35e55c71a9b503fcbbc5068fab8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / dsrw-0.1.4-py3-none-any.whl

Download URL dsrw-0.1.4-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dadba88f96ef0bee469083e8acf4119cc916c6562b3473920f4e33149449af04
BLAKE2b-256 checksum
How to use checksums
419d4d94c274c5962e91a882d64bc4d6ef3f05640603d575241e5500d84f9c5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page