$ pip install falcon
$ python3 app.py
alternatively with Gunicorn (for HTTP/1.1):
$ pip install gunicorn
$ gunicorn app:app
#!/bin/bash -e | |
# can't -u because of stuff within openrc | |
# Run the rp.yaml file against an already running placement-api. | |
# In devstack's local.conf 'enable_service placement-api' then: | |
# | |
# source PATH_TO_DEVSTACK/openrc admin admin | |
# ./placement.sh | |
import inspect | |
import collections | |
LATEST = 5.0 | |
METHODS = collections.defaultdict(list) | |
# From twisted | |
# https://github.com/twisted/twisted/blob/trunk/twisted/python/deprecate.py |
defaults: | |
request_headers: | |
x-auth-token: $ENVIRON['SERVICE_TOKEN'] | |
tests: | |
- name: check get | |
GET: /os-cells | |
response_json_paths: |
#!/bin/sh -xe | |
# A quick and dirty automatic demo of a small subset of gabbi features. | |
# Put this in /tmp or somewhere like it. Make sure you have git, | |
# tmux and virtualenv installed. | |
# !! NOTE: You must _not_ be in an already running tmux session. | |
# Make your window big or your font size small. Then `sh dogab.sh`. |
""" | |
Start with: | |
gunicorn app:application | |
or: | |
python app.py | |
Then: |
Two scripts to experiment with sorting revisions in a collection of tiddlers. | |
makeit.py just creates some bags, recipes and tiddlers to experiment with | |
each time it runs it will erase and recreate the store (if the text store | |
is being used) | |
listit.py gets all the tiddlers in a named recipe and then orders the | |
revisions within by modified time, irrespective of tiddler identity. | |
As written it processes a collection of tiddlers from a recipe but this |
import sys | |
from tsapp.proxy import create_app | |
from wsgiref.simple_server import make_server | |
def start_server(config): | |
port = int(config['port']) | |
local_host = config['local_host'] |
#!/usr/bin/env python | |
import sys | |
import json | |
from urllib2 import urlopen | |
def getstuff(from_uri): | |
print 'getting', from_uri | |
response = urlopen(from_uri) |
# | |
# Fatal error in ../deps/v8/src/api.h, line 297 | |
# CHECK(allow_empty_handle || that != __null) failed | |
# | |
==== Stack trace ============================================ | |
Security context: 0xbcfa3257229 <JS Object>#0# | |
1: invokeMacro [/Users/cdent/src/twikifier/twikifier.js:2949] (this=0xbcfa3257349 <JS Global Object>#1#,place=0x1c72e8d444f9 <JS Object>#2#,macro=0x1c72e8d4d601 <String[5]: today>,params=0x1c72e8d4d621 <String[0]: >,wikifier=0x1c72e8d451d1 <a Wikifier>#3#,tiddler=0xbcfa3204121 <undefined>) |