Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 60 lines (54 sloc) 1.705 kb
#!/usr/bin/env python
# coding: utf-8
import wsgiref.handlers
def application(environ, start_response):
start_response('200 OK', [('Content-type','text/html')])
html = """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<html xmlns="" xml:lang="en">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>JSON Services</title>
<style type="text/css">
body {
font-family: "News Gothic MT", Arial;
h1 {
color: #0F48B0;
h2 {
margin-top: 2em;
h2 a {
color: #1695A3;
h2 a:visited {
color: #225378;
h2 a:after {
content: " »";
<h1>JSON Services</h1>
Providing JSON Web Services for Unit Testing.
<div class="service">
<h2><a href="/echo">/echo</a></h2>
Parsed, structured JSON object representing the HTTP Request.
<div class="service">
<h2><a href="/time">/time</a></h2>
Returns the current unix timestamp.
<div class="service">
<h2><a href="/sleep">/sleep</a></h2>
Takes a 'seconds' query parameter and returns a simple text
response after sleeping for the given number of seconds.
return [html]
Jump to Line
Something went wrong with that request. Please try again.