bin Package

bin Package

Command line tools to create new Camelot projects and manage existing ones.

camelot_admin Module

camelot_admin is a tool to assist in the creation and development of Camelot projects. Use this application without any options to start a GUI to create a new Camelot project.

startproject

Starts a new project, use startproject project_name.

makemessages

Outputs a message file with all field names of all entities. This command requires settings.py of the project to be in the PYTHONPATH

apidoc

Extract API documentation from source code, to be used with sphinx.

license_update

Change the license header of a project, use license_update project_directory license_file

to_pyside

Takes a folder with PyQt4 source code and translates it to PySide source code. A directory to_pyside will be created containing the output of the translation

class camelot.bin.camelot_admin.CommandOptionParser(usage=None, option_list=None, option_class=<class optparse.Option at 0x96652fc>, version=None, conflict_handler='error', description=None, formatter=None, add_help_option=True, prog=None, epilog=None)[source]

Bases: optparse.OptionParser

format_help(formatter=None)[source]
camelot.bin.camelot_admin.apidoc(source, destination)[source]
camelot.bin.camelot_admin.license_update(project, license_file)[source]
camelot.bin.camelot_admin.main()[source]
camelot.bin.camelot_admin.makemessages()[source]
camelot.bin.camelot_admin.startproject(module)[source]
camelot.bin.camelot_admin.to_pyside(project)[source]

camelot_manage Module

camelot_manage is oriented towards administrators of an installed camelot application. It is used for interacting the database, the model and migration of the database to a certain schema revision.

To use this application, PYTHONPATH should contain a valid settings.py file that will be used to resolve the database engine and the model.

console

Launches a python console with the model all setup for command line interaction.

Within the example movie project one could do the following to print a list of all movie titles to the screen:

from model import Movie
for movie in Movie.query.all():
print movie.title
db_version

Get the version of the database schema from the current database

version

Get the latest available database schema version

upgrade

Upgrade or downgrade the database to the specified version, use upgrade version_number.

version_control

Put the database under version control

schema_display
Generate a graph of the database schema. The result is stored in schema.png. This option requires pydot to be installed.
_static/schema.png
class camelot.bin.camelot_manage.CommandOptionParser(usage=None, option_list=None, option_class=<class optparse.Option at 0x96652fc>, version=None, conflict_handler='error', description=None, formatter=None, add_help_option=True, prog=None, epilog=None)[source]

Bases: optparse.OptionParser

format_help(formatter=None)[source]
class camelot.bin.camelot_manage.FileCacher[source]

Cache the stdout text so we can analyze it before returning it

flush()[source]
reset()[source]
write(line)[source]
class camelot.bin.camelot_manage.Shell(locals={})[source]

Bases: code.InteractiveConsole

Wrapper around Python that can filter input/output to the shell

get_output()[source]
push(line)[source]
return_output()[source]
camelot.bin.camelot_manage.main()[source]
camelot.bin.camelot_manage.schema_display(image_path='schema.png')[source]
camelot.bin.camelot_manage.setup_model()[source]

meta Module

Utility functions and classes to start a new Camelot project, this could be the start of MetaCamelot

class camelot.bin.meta.CreateNewProject[source]

Bases: camelot.admin.action.base.Action

Action to create a new project, based on a form with options the user fills in.

model_run(context=None)[source]
start_project(options)[source]
class camelot.bin.meta.MetaCamelotAdmin[source]

Bases: camelot.admin.application_admin.ApplicationAdmin

ApplicationAdmin class to be used within meta camelot

name = 'Meta Camelot'
class camelot.bin.meta.MetaCamelotApplication(application_admin)[source]

Bases: camelot.view.main.Application

A Camelot application to build new Camelot projects.

initialization()[source]
class camelot.bin.meta.MetaSettings[source]

Bases: object

settings target to be used within MetaCamelot, when no real settings are available yet

CAMELOT_MEDIA_ROOT = '.'
ENGINE()[source]
setup_model()[source]
class camelot.bin.meta.NewProjectOptions[source]

Bases: object

class Admin(app_admin, entity)[source]

Bases: camelot.admin.object_admin.ObjectAdmin

feature = ('help_url', 'http://www.python-camelot.com/docs.html', <class 'camelot.view.controls.delegates.plaintextdelegate.PlainTextDelegate'>, 'Part of the website with online help')
field_attributes = {'domain': {'editable': True, 'delegate': <class 'camelot.view.controls.delegates.plaintextdelegate.PlainTextDelegate'>, 'tooltip': 'The domain name of the author, this will<br/>be used to store settings in the registry', 'nullable': False}, 'application_url': {'editable': True, 'delegate': <class 'camelot.view.controls.delegates.plaintextdelegate.PlainTextDelegate'>, 'tooltip': 'Website of the application', 'nullable': False}, 'name': {'editable': True, 'delegate': <class 'camelot.view.controls.delegates.plaintextdelegate.PlainTextDelegate'>, 'tooltip': 'The name of the application<br/>as it will appear in the main window and<br/>will be used to store settings in the<br/>registry.', 'nullable': False}, 'author': {'editable': True, 'delegate': <class 'camelot.view.controls.delegates.plaintextdelegate.PlainTextDelegate'>, 'tooltip': 'The author of the application, this<br/>will be used to store settings in the<br/>registry.', 'nullable': False}, 'module': {'editable': True, 'delegate': <class 'camelot.view.controls.delegates.plaintextdelegate.PlainTextDelegate'>, 'tooltip': 'The name of the python module that<br/>will contain the application', 'nullable': False}, 'source': {'editable': True, 'delegate': <class 'camelot.view.controls.delegates.localfiledelegate.LocalFileDelegate'>, 'tooltip': 'The directory in which to create<br/>the sources of the new project ', 'nullable': False}, 'help_url': {'editable': True, 'delegate': <class 'camelot.view.controls.delegates.plaintextdelegate.PlainTextDelegate'>, 'tooltip': 'Part of the website with online help', 'nullable': False}}
form_display = ['source', 'name', 'author', 'module', 'domain', 'application_url', 'help_url']
verbose_name = _('New project')
camelot.bin.meta.launch_meta_camelot()[source]

Table Of Contents

This Page


Comments
blog comments powered by Disqus