Skip to main content

Python bindings and JupyterLab integration for Perspective

Project description

perspective-python

Python APIs for perspective front end

Build Status GitHub issues codecov PyPI PyPI

Install

perspective-python can be installed from pypi with pip:

pip install -v perspective-python

Because perspective-python is a C++ library at its core, the installation process is a little more complex than pure-Python projects. When submitting issues on GitHub related to installation/dependencies, please make sure to include the verbose logs from pip install -v.

Wheels are currently distributed for:

  • MacOS (Python 3.7, Python 2.7)

For Linux and Windows, source distributions are available from PyPi. For proper installation of the source distribution (as it requires your machine to build the C++ extension), make sure the following dependencies are installed:

  • CMake
  • A C++ compiler (platform-dependent)
    • On Windows, use Microsoft Visual Studio 2017 (MSVC 14.1).

Dependencies

pyarrow==0.15.1 is a build dependency and must be installed before installing Perspective:

pip install pyarrow==0.15.1

All other dependencies (Python and C++) will be installed as part of the pip install process.

Jupyterlab Extension

To use perspective-python in JupyterLab, make sure perspective-python has already been installed successfully from pip.

Afterwards, install the extension from Jupyter's extension registry:

jupyter labextension install @finos/perspective-jupyterlab

Documentation

Python User Guide Python API Examples

Developing

To develop perspective-python, additional C++ dependencies are required (on top of CMake and a C++ compiler):

  • boost
  • PyBind11
  • tbb

On MacOS, you should be able to install Boost, PyBind11, and tbb from brew:

brew install boost pybind11 tbb

Then run yarn build, and if a .perspectiverc config file has not been created yet, you'll be taken through the yarn setup script. On the Focus section, type p for python, and continue through the script. Run yarn build again, and the python build should begin.

If you already have a .perspectiverc and want to reset your build configuration, simply run yarn setup.

Once the build successfully completes, run yarn test_python from the project root in order to verify operation.

Windows

By default, perspective-python attempts to build utilizing Microsoft Visual Studio 2017 (MSVC 14.1). You may change this to an older version by editing setup.py.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

perspective-python-0.4.5.tar.gz (1.3 MB view details)

Uploaded Source

File details

Details for the file perspective-python-0.4.5.tar.gz.

File metadata

  • Download URL: perspective-python-0.4.5.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/0.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.5

File hashes

Hashes for perspective-python-0.4.5.tar.gz
Algorithm Hash digest
SHA256 036ae3dd61652093d5261d9ad2c21f4051b271f2a1182d31987d2a937c4576c3
MD5 da5b8a9127b1822ef4f57d8cd1104839
BLAKE2b-256 3a184ad3ec4690d36c0a639a628abcb72fbeb7aee3698ef04d74380a7512d2e8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page