sciris.sc_settings

Define options for Sciris, mostly plotting options.

All options should be set using set() or directly, e.g.:

sc.options(font_size=18)

To reset default options, use:

sc.options('default')

Note: “options” is used to refer to the choices available (e.g., DPI), while “settings” is used to refer to the choices made (e.g., dpi=150).

Functions

help

Get help on Sciris in general, or search for a word/expression.

parse_env

Simple function to parse environment variables

Classes

Options

Set options for Sciris.

parse_env(var, default=None, which='str')[source]

Simple function to parse environment variables

Parameters
  • var (str) – name of the environment variable to get

  • default (any) – default value

  • which (str) – what type to convert to (if None, don’t convert)

New in version 2.0.0.

help(pattern=None, source=False, ignorecase=True, flags=None, context=False, output=False)[source]

Get help on Sciris in general, or search for a word/expression.

Parameters
  • pattern (str) – the word, phrase, or regex to search for

  • source (bool) – whether to search source code instead of docstrings for matches

  • ignorecase (bool) – whether to ignore case (equivalent to flags=re.I)

  • flags (list) – additional flags to pass to re.findall()

  • context (bool) – whether to show the line(s) of matches

  • output (bool) – whether to return the dictionary of matches

Examples:

sc.help()
sc.help('smooth')
sc.help('JSON', ignorecase=False, context=True)
sc.help('pickle', source=True, context=True)
New in version 1.3.0.
New in version 1.3.1: “source” argument