A string that is either a Python log configuration or a path to the configuration file
Default: logconfig=None
If set to True, invoking the app will not start the web server – it will just execute any given command line arguments and exit. Equivalent to the --exit command line option.
Default: False
Directory where temporary files and directories are created.
Default: work_dir="vesper_work"
A dictionary of stores, whose keys are the names of the store and values are dictionaries containing the datastore configuration settings for that store.
If more than one store is specified, a default store must be indicated, in one of two ways: either by naming the store “default” or by including a “default_store” setting in the stores’ dictionary of configuration settings.
If stores is set, then other datastore configuration settings are ignored.
Example: stores = {'config': {'storage_path': 'config.json'}, 'data': {'storage_path': 'data.json', 'default_store': True}}
A dictionary containing datastore configuration settings that are applied to each store defined in the configuration. Any other datastore settings override the settings here. If the value of the settings is another dictionary of settings (e.g. model_options) those dictionaries are merged recursively.
Example storeDefaults = {'model_options': {'serializeOptions': {'pjson': 'omitEmbeddedIds': True}}}
If True vesper.app will use interprocess file lock when committing a transaction. Alternately use_file_lock can be a reference to a class or factory function that conforms to the glock.LockFile interface.
Default is False
use_file_lock=True #enable
The path name for the lock file. If file_lock_path is not set, a path name is generated using the os’s temp directory and a file name based on a hash of the model_resource_uri (this is to ensure that any process opening the same datastore will share the same lock file).
file_lock_path='./appinstance1.lock'
These configuration variables can be specified either directly in the configuration (if configuring only one store) or in each store in the stores configuration. They can also appear in the storeDefaults dictionary.
The class or factory function called to instantiate the application’s primary data store It is passed as keyword arguments the dictionary of the variables contained in the config file note that this is a callable object which may need to be imported into the config file
Default: vesper.DataStore.BasicDataStore
The resource that represents the model this instance of the application is running.
Default: ‘http://‘ + socket.getfqdn() + ‘/’
Example: model_uri='http://example.com/'
A pseudo-URL that describes the connection to the data store. Todo: document how this overrides storage_path and modelFactory
Default: storage_url='mem:
The path of the transaction log. The transaction log records in NTriples format a log of the statements added and removed from the model along with comments on when and by whom. If the value is True, a file path is created by appending “.log.nt” to storeage_path.
default is False (no transaction log)
Example: transaction_log='/logs/auditTrail.log.nt'
A string that is used as the initial data when creating a new store (which happens when the file specified by storage_path is not found)
storage_template=’‘’{ “id”: “1”, “content”: “hello world” } ‘’‘
The class or factory function used by RxPathDomStore to load or create a new RDF document or database note that this is a callable object which may need to be imported into the config file
default is RxPath.IncrementalNTriplesFileModel
model_factory=RxPath.RedlandHashBdbModel
The location of a separate RDF model for storing the history of changes to the database. Usually a file path but the appropriate value depends on ‘version_model_factory’
default is ‘’ (history not stored separately)
version_storage_path = ‘mywebsite.history.nt’
The class or factory function used by RxPathDomStore to load or create the version history RDF database #note that this is a callable object which may need to be imported into the config file
default is whatever ‘model_factory’ is set to
version_model_factory=RxPath.RedlandHashBdbModel
The Python class (or callable object) of the WSGI server that is instantiated when the app is started
Default: httpserver=wsgiref.simple_server
A WSGI middleware Python class or callable object which, if specified, will be instantiated with the Vesper WSGI app (wrapping it).
Default: wsgi_middleware=None
Example: import firepython.middleware; wsgi_middleware = firepython.middleware.FirePythonWSGI
A string or list specifying the directories that will be searched when resolving static URLs
Default: the current working directory of the process running the app
Example: static_path = 'static'
A string or list specifying the directories that will be searched when resolving Mako templates.
Default: the current working directory of the process running the app
Example: template_path = 'templates'
The name of the page to be invoke if the request URL doesn’t include a path e.g. http://www.example.org/ is equivalent to http://www.example.org/index
default is: ‘index.html’
default_page_name=’home.html’
If True, If-None-Match request headers are honors and an etag based on a MD5 hash of the response content will be set with every response
default is True use_etags = False #disable
Specifies the directory where the mako templates are compiled. This property sets the module_directory parameter in the mako.lookup.TemplateLookup constructor.
Default is “work_dir/mako_module” where work_dir is that given configuration value.
This setting is a dictionary that contains keyword arguments for the mako.lookup.TemplateLookup constructor used when initializing the template engine. Keys in this dictionary override the default values for that parameter.
Default is {}
Limits URLs access to only the directories reachable through static_path or templates_path
default is True
secure_file_access = True
A function called during command line processing at startup. It takes two arguments: the AppConfig object and the list of command arguments (excluding any arguments applied to built-in command options). Returns a list of arguments to be applied as config settings and set as cmd_args if cmd_args is not set.
Default: lambda app, args: args
Command usage string
Default: “%prog [options] [settings]”
Help text appended to command line help message (invoked by -h or –help)
Default: “Settings:n–[name]=VALUE Add [name] to config settings”
A short name for this application, must be unique within the current vesper.app process
Default: “root”
Example: app_name = 'root'
Used by Requestor objects as the trigger to use to invoke a request default is ‘http-request’.
Example: default_trigger='http-request'
A list of request metadata variables that should be preserved when invoking callActions() (e.g. to invoke templates or an error handler) default is [] (but vesper.app will always adds the following: ‘_name’, ‘_noErrorHandling’, ‘__current-transaction’, and ‘__readOnly’)
Example: global_request_vars = [ '__account', '_static']
A function that is called when receiving an external request (e.g. an http request) It is called before invoking runActions(). Use it to make sure the request doesn’t contain metadata that could dangerously confuse request processing. Its signature looks like: def validate_external_request(kw) where kw is the request metadata dictionary (which can be modified if necessary). It should raise vesper.app.NotAuthorized if the request should not be processed.
default is lambda *args: True
Sets the maximum number of items to be stored in the Action cache. Set to 0 to disable.
default is 0
action_cache_size=1000