Python API changes from community #2754
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GLOBAL_SERVER
andGLOBAL_CLIENT
, and exportGLOBAL_CLIENT
methods as module-level free functions, similar to Perspective2.x
. MovedServer
-instantiating functions likePerspectiveWidget
to useGLOBAL_SERVER
by default instead.Table
andView
have been removed as they are easily confused with 2.x's class constructors.new_local_client()
andfrom_server
methods to portable implementations.pyarrow
andpandas
are now detected viasys.modules
import detection and won't be loaded unless the Python interpreter has already cached these modules. Thandlers
packages. e.g.from perspective.handlers.tornado import PerspectiveTornadoHandler
must be used explicitly now.perspective.handlers
as well, and thetry
/except
block which protected lack of these modules in the dependency environment.import perspective.handlers.tornado
is now a hard error withouttornado
installed.PerspectiveWidget
import, e.g.from perspective.widget import PerspectiveWidget
must be used explicitly now.ipywidgets
is no longer a conditional import, andimport perspective.widget
will hard fail if this module is not installed.Jinja2
dependencyjupyter
,tornado
,aiohttp
andstarlette
optional dependency bundles topyproject.toml
.pyarrow
andpandas
are not included as optional dependencies.View.to_dataframe()
method.index
.