From e8561f919548e2fe17f82d98e2a13e1e4e85bf40 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 7 Jul 2011 01:57:18 -0500 Subject: Added/updated documentation for the new interactive shell. --- docs/api/paster.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'docs/api/paster.rst') diff --git a/docs/api/paster.rst b/docs/api/paster.rst index 9ecfa3d9c..6668f3c77 100644 --- a/docs/api/paster.rst +++ b/docs/api/paster.rst @@ -5,9 +5,12 @@ .. module:: pyramid.paster -.. function:: get_app(config_file, name) +.. function:: get_app(config_file, name=None) Return the WSGI application named ``name`` in the PasteDeploy config file ``config_file``. - + If the ``name`` is None, this will attempt to parse the name from + the ``config_file`` string expecting the format ``ini_file#name``. + If no name is found, the name will default to "main". + -- cgit v1.2.3 From f422adb9108520182c7eee5128c0f1e1f64d2e17 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 13 Jul 2011 22:57:09 -0500 Subject: Added p.paster.bootstrap for handling simple loading of INI files. --- docs/api/paster.rst | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'docs/api/paster.rst') diff --git a/docs/api/paster.rst b/docs/api/paster.rst index 6668f3c77..09e768fae 100644 --- a/docs/api/paster.rst +++ b/docs/api/paster.rst @@ -3,14 +3,8 @@ :mod:`pyramid.paster` --------------------------- -.. module:: pyramid.paster +.. automodule:: pyramid.paster -.. function:: get_app(config_file, name=None) - - Return the WSGI application named ``name`` in the PasteDeploy - config file ``config_file``. - - If the ``name`` is None, this will attempt to parse the name from - the ``config_file`` string expecting the format ``ini_file#name``. - If no name is found, the name will default to "main". + .. autofunction:: get_app + .. autofunction:: bootstrap -- cgit v1.2.3 From 00f7c6abb9ed581411044e9aee2f1647cfadfcb7 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 14 Jul 2011 19:54:59 -0500 Subject: Added test coverage for p.paster.bootstrap. --- docs/api/paster.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'docs/api/paster.rst') diff --git a/docs/api/paster.rst b/docs/api/paster.rst index 09e768fae..2a32e07e9 100644 --- a/docs/api/paster.rst +++ b/docs/api/paster.rst @@ -5,6 +5,13 @@ .. automodule:: pyramid.paster - .. autofunction:: get_app + .. function:: get_app(config_uri, name=None) + + Return the WSGI application named ``name`` in the PasteDeploy + config file specified by ``config_uri``. + + If the ``name`` is None, this will attempt to parse the name from + the ``config_uri`` string expecting the format ``inifile#name``. + If no name is found, the name will default to "main". .. autofunction:: bootstrap -- cgit v1.2.3 From 38e4c7d6b0a51a92747e6c928599a7d651362c6c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 27 Nov 2011 00:00:55 -0500 Subject: add get_appsettings API to paster --- docs/api/paster.rst | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'docs/api/paster.rst') diff --git a/docs/api/paster.rst b/docs/api/paster.rst index 2a32e07e9..5cf8bbe2c 100644 --- a/docs/api/paster.rst +++ b/docs/api/paster.rst @@ -5,13 +5,9 @@ .. automodule:: pyramid.paster - .. function:: get_app(config_uri, name=None) + .. autofunction:: bootstrap - Return the WSGI application named ``name`` in the PasteDeploy - config file specified by ``config_uri``. + .. autofunction:: get_app(config_uri, name=None) - If the ``name`` is None, this will attempt to parse the name from - the ``config_uri`` string expecting the format ``inifile#name``. - If no name is found, the name will default to "main". + .. autofunction:: get_appsettings(config_uri, name=None) - .. autofunction:: bootstrap -- cgit v1.2.3 From 596495de4aa1ab0f3a3752d21c14ac08631e8457 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 27 Nov 2011 00:42:14 -0500 Subject: - Added ``setup_logging`` API function to the ``pyramid.paster`` module. This function sets up Python logging according to the logging configuration in a PasteDeploy ini file. --- docs/api/paster.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/api/paster.rst') diff --git a/docs/api/paster.rst b/docs/api/paster.rst index 5cf8bbe2c..3f7a1c364 100644 --- a/docs/api/paster.rst +++ b/docs/api/paster.rst @@ -11,3 +11,4 @@ .. autofunction:: get_appsettings(config_uri, name=None) + .. autofunction:: setup_logging(config_uri) -- cgit v1.2.3 From 8f4fcc47c9405f20cfed3a40931f12534b3b7193 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 20 Nov 2012 22:47:50 -0500 Subject: coverage --- docs/api/paster.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/api/paster.rst') diff --git a/docs/api/paster.rst b/docs/api/paster.rst index 3f7a1c364..bde128e05 100644 --- a/docs/api/paster.rst +++ b/docs/api/paster.rst @@ -7,7 +7,7 @@ .. autofunction:: bootstrap - .. autofunction:: get_app(config_uri, name=None) + .. autofunction:: get_app(config_uri, name=None, options=None) .. autofunction:: get_appsettings(config_uri, name=None) -- cgit v1.2.3 From e81e76ae9e0fd1c45ddb61a873d67cd6e2d9f643 Mon Sep 17 00:00:00 2001 From: Georges Dubus Date: Thu, 14 Mar 2013 10:39:05 +0100 Subject: Added an options argument to pyramid.paste.get_appsettings, just like get_app, that can be used to get the settings when interpolation is used in the config file. --- docs/api/paster.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/api/paster.rst') diff --git a/docs/api/paster.rst b/docs/api/paster.rst index bde128e05..edc3738fc 100644 --- a/docs/api/paster.rst +++ b/docs/api/paster.rst @@ -9,6 +9,6 @@ .. autofunction:: get_app(config_uri, name=None, options=None) - .. autofunction:: get_appsettings(config_uri, name=None) + .. autofunction:: get_appsettings(config_uri, name=None, options=None) .. autofunction:: setup_logging(config_uri) -- cgit v1.2.3 From 1514ea003dfe39fa79a0ec07bbbc14f239cb4eb2 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Mon, 7 Mar 2016 08:20:39 -0800 Subject: Pass vars to logging.config.fileConfig This allows one to set up a logging configuration that is parameterized based on variables specified on the command-line. e.g.: the application .ini file could have: ```ini [logger_root] level = %(LOGGING_LOGGER_ROOT_LEVEL)s handlers = console [handler_console] class = StreamHandler args = (sys.stderr,) level = %(LOGGING_HANDLER_CONSOLE_LEVEL)s formatter = generic ``` This app could be launched with: ``` pserve development.ini LOGGING_LOGGER_ROOT_LEVEL=DEBUG LOGGING_HANDLER_CONSOLE_LEVEL=DEBUG ``` --- docs/api/paster.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/api/paster.rst') diff --git a/docs/api/paster.rst b/docs/api/paster.rst index edc3738fc..27bc81a1f 100644 --- a/docs/api/paster.rst +++ b/docs/api/paster.rst @@ -11,4 +11,4 @@ .. autofunction:: get_appsettings(config_uri, name=None, options=None) - .. autofunction:: setup_logging(config_uri) + .. autofunction:: setup_logging(config_uri, global_conf=None) -- cgit v1.2.3