class_docstr: Access the history database without adding to it.
  
  This is intended for use by standalone history tools. IPython shells use
  HistoryManager, below, which is a subclass of this.
class_docstr_tok: ["Access","the","history","database","without","adding","to","it",".","This","is","intended","for","use","by","standalone","history","tools",".","IPython","shells","use","HistoryManager",",","below",",","which","is","a","subclass","of","this","."]
docstr: Create a new history accessor.
  
  Parameters
  ----------
  profile : str
    The name of the profile from which to open history.
  hist_file : str
    Path to an SQLite history database stored by IPython. If specified,
    hist_file overrides profile.
  config : :class:`~traitlets.config.loader.Config`
    Config object. hist_file can also be set through this.
docstr_tok: ["Create","a","new","history","accessor",".","Parameters","--","--","--","--","--","profile",":","str","The","name","of","the","profile","from","which","to","open","history",".","hist_file",":","str","Path","to","an","SQLite","history","database","stored","by","IPython",".","If","specified",",","hist_file","overrides","profile",".","config",":",":","class",":","`","~traitlets.config.loader.Config","`","Config","object",".","hist_file","can","also","be","set","through","this","."]
code: def __init__(self, profile="default", hist_file="", **traits):
      """Create a new history accessor.
  
      Parameters
      ----------
      profile : str
        The name of the profile from which to open history.
      hist_file : str
        Path to an SQLite history database stored by IPython. If specified,
        hist_file overrides profile.
      config : :class:`~traitlets.config.loader.Config`
        Config object. hist_file can also be set through this.
      """
      # We need a pointer back to the shell for various tasks.
      super(HistoryAccessor, self).__init__(**traits)
      # defer setting hist_file from kwarg until after init,
      # otherwise the default kwarg value would clobber any value
      # set by config
      if hist_file:
          self.hist_file = hist_file
  
      if self.hist_file == "":
          # No one has set the hist_file, yet.
          self.hist_file = self._get_hist_file_name(profile)
  
      if sqlite3 is None and self.enabled:
          warn(
              "IPython History requires SQLite, your history will not be saved"
          )
          self.enabled = False
  
      self.init_db()
  
imports: from __future__ import print_function
  import atexit
  import datetime
  import os
  import re
  import threading
  from traitlets.config.configurable import LoggingConfigurable
  from decorator import decorator
  from IPython.utils.decorators import undoc
  from IPython.paths import locate_profile
  from IPython.utils import py3compat
  from traitlets import Any, Bool, Dict, Instance, Integer, List, Unicode, TraitError, default, observe
  from warnings import warn
label_desc: Use image node_id 2 to create a new HistoryAccessor object from inherited base classes: HistoryAccessorBase with example: obj = HistoryAccessor(profile, hist_file)