https://github.com/ipython/disp
Providing default representations of common objects in Python land
https://github.com/ipython/disp
Last synced: 14 days ago
JSON representation
Providing default representations of common objects in Python land
- Host: GitHub
- URL: https://github.com/ipython/disp
- Owner: ipython
- License: bsd-3-clause
- Archived: true
- Created: 2017-05-30T22:26:20.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-23T18:20:12.000Z (over 8 years ago)
- Last Synced: 2025-01-17T11:17:00.719Z (12 months ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 46.9 KB
- Stars: 20
- Watchers: 8
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Disp
Providing default representations of common objects in Python land

Works in IPython when the object is the value returned by the last statement of
a cell, or when calling `display()` on it.
## Install
```
$ pip install disp
$ ipython -c 'import disp; disp.install()'
💖 Installation succeeded: enjoy disp ! 💖
```
## Uninstall
```
$ ipython -c 'import disp; disp.uninstall()'
```
## Supported objects
The following objects will gain superpowers automatically:
- `pyspark.context:SparkContext`
- `pyspark.sql:SparkSession`
The followings objects need to be explicitly register with
`disp.activate_builtins()` and will work only on Python 3.6 and later:
- types
- functions methods (and alike)
- modules
The following objects need to be explicitly activated individually for each
type with `disp.activate_for(instance)`:
- requests.models.Response (Python 3.6+ only)
A couple of other objects are secretly available on Python 3.6, but are still
unstable so-far (dig through the source).
## Example
See our [example notebook](http://nbviewer.jupyter.org/github/ipython/disp/blob/master/example/Disp-Example-builtins.ipynb)
## Do you support more objects?
Do you want to submit a Pull Request? We'll probably accept it. 🤓
# releasing
Bump version number in `setup.py`.
Install `twine`
```
$ python setup.py sdist bdist_wheel
$ twine upload dist/*
```