Panopti: Interactive 3D visualization in Python.
Project description
Panopti:
Interactive 3D Visualization in Python
[ Documentation ] - [ PyPI ]
Panopti is a Python package for interactive 3D visualization that is designed so that users only need to write Python code, making it painless to setup interactive experiments and scenes. All code examples and demos throughout the documentation are achieved purely using Panopti in Python -- no JavaScript required!
Panopti offers several features:
- ✅ Remote SSH compatible
- ✅ Headless rendering
- ✅ Geometric primitives: meshes, point clouds, animated geometry, arrows, etc.
- ✅ Interactive UI elements with Python callbacks
- ✅ Programmable events: on-click, inspection tool, transformation gizmo, camera update, etc.
- ✅ Convenience features: exporting geometry, embedding Plotly figures
- ✅ Interactive web console that lets you debug with your Python script's state
- ✅ Material customization
See the docs for more!
Install from pip:
pip install panopti
Simple example
First start a Panopti server in a separate terminal:
python -m panopti.run_server --host localhost --port 8080
Then you can easily define your scene, for example:
import panopti
import trimesh # just for io
import numpy as np
# create panopti client that connects to server:
viewer = panopti.connect(server_url="http://localhost:8080", viewer_id='client')
# open viewer in browser: http://localhost:8080/?viewer_id=client
mesh = trimesh.load('./examples/demosthenes.obj')
verts, faces = mesh.vertices, mesh.faces
# add a mesh to the scene:
viewer.add_mesh(
vertices=verts,
faces=faces,
name="Statue"
)
def callback_button(viewer):
# Update mesh vertices on button press by adding Gaussian noise
statue = viewer.get('Statue')
noise = np.random.normal(scale=0.05, size=statue.vertices.shape)
new_verts = statue.vertices + noise
statue.update(vertices=new_verts)
viewer.button(callback=callback_button, name='Click Me!')
viewer.hold() # prevent script from terminating
For more examples see Documentation or /examples
Installation
To install from pip:
pip install panopti
To install from source:
git clone https://github.com/ArmanMaesumi/panopti
# build frontend viewer
cd panopti/frontend
npm install
npm run build
cd ..
# install python package
pip install .
Dependencies
Core dependencies:
pip install numpy eventlet requests flask flask-socketio python-socketio[client] tomli msgpack trimesh
Optional dependencies:
pip install matplotlib # for colormap utilities
pip install plotly==5.22.0 # for plotly figure support
Doc-related dependencies:
pip install mkdocs mkdocs-material mkdocstrings mkdocstrings-python
Development
Details for running the local development workflow can be found in: /frontend/README.md
Cite as
@misc{panopti,
title = {Panopti},
author = {Arman Maesumi},
note = {https://github.com/ArmanMaesumi/panopti},
year = {2025}
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file panopti-0.3.0.tar.gz.
File metadata
- Download URL: panopti-0.3.0.tar.gz
- Upload date:
- Size: 8.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e0011952032335ef32aec66872b1f4243241f3b8aea4a66cd04d64b2e3a41c1
|
|
| MD5 |
62d068ea796923c13732f5a8b1a46ec6
|
|
| BLAKE2b-256 |
0a10a5c4dabfd4f04871429fc016f471ad2cffeee0c92359b0ebd85c2f3b789e
|
File details
Details for the file panopti-0.3.0-py3-none-any.whl.
File metadata
- Download URL: panopti-0.3.0-py3-none-any.whl
- Upload date:
- Size: 8.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c279793dcb809332a57de991babd2fd4c371f325b91c9ba6fabb20e763f1864a
|
|
| MD5 |
4219237fc8d9e7df0e87081870d43cfa
|
|
| BLAKE2b-256 |
993356a6b47c76db03d547eb71ccb0823cb97f6a64205824dec0276054630425
|