situp.py public API

class situp.AddServer[source]

Add a server to the servers.json file

class situp.Command[source]

A command has a name, an option parser and a dictionary of sub commands it can call.

class situp.Document[source]

Create an empty json document (containing just an _id) in the _docs folder of the application root.

class situp.Fetch[source]

Copy a remote CouchApp into the working directory.

run_command(args, options)
class situp.FetchVendors[source]

Vendors are generators that download external code into the right place. The code is held in kanso packages, and situp assumes that these have been correctly built.

install_external(external, options, vendor_path=None)[source]

Install external

run_command(args, options)[source]

Vendors behave differently to other generators

class situp.Generator[source]

A generator knows how to create files and where to create them.

run_command(args, options)[source]

Run the generator

class situp.GitHook[source]

Write a post commit git hook such that situp.py push is called after git commit.

class situp.Html[source]

Create an empty html document in the _attachments folder of the specified design document. TODO: include script tags for all vendors in generated html.

class situp.InstallVendor[source]

Command to install a vendor from a remote source.

run_command(args, options)[source]
class situp.LocatedFile

LocatedFile(path, filename)

filename

itemgetter(item, ...) –> itemgetter object

Return a callable object that fetches the given item(s) from its operand. After, f=itemgetter(2), the call f(r) returns r[2]. After, g=itemgetter(2,5,3), the call g(r) returns (r[2], r[5], r[3])

path

itemgetter(item, ...) –> itemgetter object

Return a callable object that fetches the given item(s) from its operand. After, f=itemgetter(2), the call f(r) returns r[2]. After, g=itemgetter(2,5,3), the call g(r) returns (r[2], r[5], r[3])

class situp.Package

Package(url, filter)

filter

itemgetter(item, ...) –> itemgetter object

Return a callable object that fetches the given item(s) from its operand. After, f=itemgetter(2), the call f(r) returns r[2]. After, g=itemgetter(2,5,3), the call g(r) returns (r[2], r[5], r[3])

url

itemgetter(item, ...) –> itemgetter object

Return a callable object that fetches the given item(s) from its operand. After, f=itemgetter(2), the call f(r) returns r[2]. After, g=itemgetter(2,5,3), the call g(r) returns (r[2], r[5], r[3])

class situp.Push[source]

The Push command sends the application to the CouchDB server. Specify a design to push only a single design document, otherwise all designs in the app will be pushed.

run_command(args, options)[source]

Build a python dictionary of the application, jsonise it and push it to CouchDB

class situp.View[source]

Create the map.js and reduce.js files for a view. Can use built in erlang reducers (faster) for the reduce.js (see options above).

situp.fetch_archive(url, path, filter_list=[])[source]

Fetch a remote tar/zip archive and extract it, applying a filter if one is provided.

Previous topic

Command line interface

This Page