Python bindings and JupyterLab integration for Perspective
Project description
perspective-python
Python APIs for perspective front end
Install
Dependencies
PyArrow==0.15.1
and Numpy
are required build-time dependencies, and can both be installed via pip
.
pip install pyarrow==0.15.1
It is recommended to have https://github.com/intel/tbb installed as a system dependency:
On MacOs:
brew install tbb
On CentOS/RHEL:
yum install tbb-devel
On Ubuntu:
apt-get install libtbb-dev
On Windows:
choco install tbb
Or install from source.
All other dependencies will be vendored if missing as part of Perspective's CMake build, but you can install them yourself and CMake will detect them via the usual mechanisms.
Installation
To install the base package from pip:
pip install perspective-python
To install the JupyterLab extension:
jupyter labextension install @finos/perspective-jupyterlab
Getting Started
Python User Guide Python API Examples
Developing
To build perspective-python
from source, you'll need the following C++ dependencies:
- Python 3.7
- numpy
- CMake
- PyBind11
- tbb
On MacOS, you should be able to install Boost, PyBind11, and tbb from brew:
brew install pybind11 tbb
And then install Python dependencies using pip:
python3 -m pip install -r requirements-dev.txt
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 attempts to build utilizing Microsoft Visual Studio 2017 (MSVC 14.1). You may change this to older versions 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
File details
Details for the file perspective-python-0.4.2.post1.tar.gz
.
File metadata
- Download URL: perspective-python-0.4.2.post1.tar.gz
- Upload date:
- Size: 2.5 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | debc879c1e1fbb82f57fc55beb924083f1576e7d2ddcf4d0683564ba01546a12 |
|
MD5 | c6ba506de738a4959e9a5af370719646 |
|
BLAKE2b-256 | 1cd1595ffd299c414c9ffd9263ae5b742885b4c8888c27b2ab44d59d19904cfc |