PageRenderTime 18ms CodeModel.GetById 15ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/scripts/api/create.py

https://bitbucket.org/cistrome/cistrome-harvard/
Python | 16 lines | 7 code | 3 blank | 6 comment | 4 complexity | 97d0f9d2d65da77c84606ddf3cc58ae5 MD5 | raw file
 1#!/usr/bin/env python
 2"""
 3Generic POST/create script
 4
 5usage: create.py key url [key=value ...]
 6"""
 7
 8import os, sys
 9sys.path.insert( 0, os.path.dirname( __file__ ) )
10from common import submit
11
12data = {}
13for k, v in [ kwarg.split('=', 1) for kwarg in sys.argv[3:]]:
14    data[k] = v
15
16submit( sys.argv[1], sys.argv[2], data )