#-----------------------------------------------------------------------------# Copyright (c) Anaconda, Inc., and Bokeh Contributors.# All rights reserved.## The full license is in the file LICENSE.txt, distributed with this software.#-----------------------------------------------------------------------------''' Bokeh is a Python library for creating interactive visualizations for modernweb browsers.Bokeh helps you build beautiful graphics, ranging from simple plots to complexdashboards with streaming datasets. With Bokeh, you can create JavaScript-poweredvisualizations without writing any JavaScript yourself.Most of the functionality of Bokeh is accessed through submodules such as|bokeh.plotting| and |bokeh.models|.For full documentation, please visit https://docs.bokeh.org----The top-level ``bokeh`` module itself contains a few useful functions andattributes:.. attribute:: __version__ :annotation: = currently installed version of Bokeh.. autofunction:: bokeh.license'''#-----------------------------------------------------------------------------# Boilerplate#-----------------------------------------------------------------------------from__future__importannotationsimportlogging# isort:skiplog=logging.getLogger(__name__)#-----------------------------------------------------------------------------# Imports#-----------------------------------------------------------------------------# Standard library importsimportimportlib.metadataasimportlib_metadata#-----------------------------------------------------------------------------# Globals and constants#-----------------------------------------------------------------------------__all__=('__version__','license',)__version__=importlib_metadata.version("bokeh")#-----------------------------------------------------------------------------# General API#-----------------------------------------------------------------------------# deprecated, remove at some pointdefdownload():fromwarningsimportwarnfrom.util.warningsimportBokehUserWarningwarn("bokeh.download() is no longer used. All sample data is available in ""the 'bokeh_sampledata' package. Use 'pip install bokeh_sampledata' ""or 'conda install bokeh_sampledata' to install it.",BokehUserWarning)
[docs]deflicense():''' Print the Bokeh license to the console. Returns: None '''frompathlibimportPathwithopen(Path(__file__).parent/'LICENSE.txt')aslic:print(lic.read())
#-----------------------------------------------------------------------------# Dev API#-----------------------------------------------------------------------------#-----------------------------------------------------------------------------# Private API#-----------------------------------------------------------------------------#-----------------------------------------------------------------------------# Code#-----------------------------------------------------------------------------delimportlib_metadata# configure Bokeh loggerfrom.utilimportlogconfig# isort:skipdellogconfig# Configure warnings to always show nice messages, despite Python's active# efforts to hide them from users.importwarnings# isort:skipfrom.util.warningsimportBokehDeprecationWarning,BokehUserWarning# isort:skipwarnings.simplefilter('always',BokehDeprecationWarning)warnings.simplefilter('always',BokehUserWarning)original_formatwarning=warnings.formatwarningdef_formatwarning(message,category,filename,lineno,line=None):from.util.warningsimportBokehDeprecationWarning,BokehUserWarningifcategorynotin(BokehDeprecationWarning,BokehUserWarning):returnoriginal_formatwarning(message,category,filename,lineno,line)returnf"{category.__name__}: {message}\n"warnings.formatwarning=_formatwarningdel_formatwarningdelBokehDeprecationWarning,BokehUserWarningdelwarnings