### Navigation

- index
- modules |
- Camelot documentation »

# 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)

  Bases: `optparse.OptionParser`

  `format_help`(formatter=None)

`camelot.bin.camelot_admin.``apidoc`(source, destination)

`camelot.bin.camelot_admin.``license_update`(project, license_file)

`camelot.bin.camelot_admin.``main`()

`camelot.bin.camelot_admin.``makemessages`()

`camelot.bin.camelot_admin.``startproject`(module)

`camelot.bin.camelot_admin.``to_pyside`(project)

## `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.

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)

  Bases: `optparse.OptionParser`

  `format_help`(formatter=None)

class `camelot.bin.camelot_manage.``FileCacher`

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

  `flush`()
  `reset`()
  `write`(line)

class `camelot.bin.camelot_manage.``Shell`(locals={})

  Bases: `code.InteractiveConsole`

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

  `get_output`()
  `push`(line)
  `return_output`()

`camelot.bin.camelot_manage.``main`()

`camelot.bin.camelot_manage.``schema_display`(image_path='schema.png')

`camelot.bin.camelot_manage.``setup_model`()

## `meta` Module

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

class `camelot.bin.meta.``CreateNewProject`

  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)
  `start_project`(options)

class `camelot.bin.meta.``MetaCamelotAdmin`

  Bases: `camelot.admin.application_admin.ApplicationAdmin`

  ApplicationAdmin class to be used within meta camelot

  `name` = 'Meta Camelot'

class `camelot.bin.meta.``MetaCamelotApplication`(application_admin)

  Bases: `camelot.view.main.Application`

  A Camelot application to build new Camelot projects.

  `initialization`()

class `camelot.bin.meta.``MetaSettings`

  Bases: `object`

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

  `CAMELOT_MEDIA_ROOT` = '.'
  `ENGINE`()
  `setup_model`()

class `camelot.bin.meta.``NewProjectOptions`

  Bases: `object`

  class `Admin`(app_admin, entity)

    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`()

### Navigation

- index
- modules |
- Camelot documentation »

Comments
blog comments powered by Disqus