facio.config

class facio.config.CommandLineInterface[source]

Facio

Facio is a project scaffolding tool originally developed for Django and expanded to be framework agnostic. You can use Facio to bootstrap any sort of project.

Documentation:
https://facio.readthedocs.org
Usage:
facio <project_name> [–template <path>|–select] [–vars <variables>]
Options:

-h –help Show this help text. –version Show version. -t –template <path> Template path, can be repository link

(git+ / hg+) or a template name defined in ~/.facio.cfg.
-s –select Lists templates in ~/.facio.cfg prompting you
to select a template from this list.
--vars <variables>
 Comma separated key=value pairs of values to be used in processing templates.
Example:
facio hello_world -t git+git@github.com:you/django.git –vars foo=bar
start()[source]
validate_project_name(name)[source]
class facio.config.ConfigurationFile[source]

Load the ~/.facio.cfg ini style configuration file, providing an easily queryable dict representation of the config attributes.

error(message)

Print error that does not result in an exit (Red)

Parameters:message (str) – Message to print to user
gather(message)

Common message prompting for gathering input form the end user.

Parameters:message (str) – Message to print to user
out(message, color=<function blue at 0x7f9c287a5848>)

Print message information to user (Blue)

Parameters:message (str) – Message to print to user

** Optional Key Word Arguments **

Parameters:color – Clint color function to use
Type:function – default blue
read(name='.facio.cfg')[source]

Parse the config file using ConfigParser module.

Parameters:name (str) – The file name to read in the users home dir – optional
Returns:ConfirgParser or bool
success(message)

Print a success message (Green)

Parameters:message (str) – Message to print to user
warning(message)

Print a warning message (Yellow)

Parameters:message (str) – Message to print to user
class facio.config.Settings(interface, config)[source]
copy_ignore_globs()[source]

Returns list of of file copy ignore globs from configuration file.

Returns:list
default_template_path = '/var/build/user_builds/facio/envs/latest/lib/python2.7/site-packages/facio-2.0.0-py2.7.egg/facio/default'
error(message)

Print error that does not result in an exit (Red)

Parameters:message (str) – Message to print to user
gather(message)

Common message prompting for gathering input form the end user.

Parameters:message (str) – Message to print to user
get_template_path()[source]

Obtain the template with from the command line interface or from prompting the user to choose a template from the config file.

Returns:str or bool
get_variables()[source]

Returns dict of variables passed into command line interface.

Returns:dict
out(message, color=<function blue at 0x7f9c287a5848>)

Print message information to user (Blue)

Parameters:message (str) – Message to print to user

** Optional Key Word Arguments **

Parameters:color – Clint color function to use
Type:function – default blue
render_ignore_globs()[source]

Returns list of of file render ignore globs from configuration file.

Returns:list
success(message)

Print a success message (Green)

Parameters:message (str) – Message to print to user
warning(message)

Print a warning message (Yellow)

Parameters:message (str) – Message to print to user

Related Topics

This Page