semvec/pypi-packages huggingface dataset:
htmlviewer 0.1.7
Table viewer for relational databases, without using HandsOnTable.
License: MIT

# HTMLViewer

[![PyPI version shields.io](https://img.shields.io/pypi/v/htmlviewer.svg)](https://pypi.python.org/pypi/htmlviewer/)
[![PyPI license](https://img.shields.io/pypi/l/htmlviewer.svg)](https://pypi.python.org/pypi/htmlviewer/)

Table viewer for relational databases, without using HandsOnTable.

Actually, any list of JSON-serializable dictionaries can be viewed.

This is the remake of [pyhandsontable](https://github.com/patarapolw/pyhandsontable).

## Installation

```
pip install htmlviewer
```

## Usage

In Jupyter Notebook,

```python
>>> from htmlviewer import PagedViewer
>>> viewer = PagedViewer(LIST_OF_RECORDS, **kwargs)
>>> viewer
'A table is shown on Jupyter Notebook.'
>>> viewer.view(-1)
'The last page is shown.'
>>> viewer.previous()
'The previous page (i-1) is shown.'
>>> viewer.next()
'The next page (i+1) is shown.
```

Acceptable kwargs are,

```python
{
    'maxColWidth': 200,  # Maximum column width for all columns.
    'minColWidth': '8em',
    'maxRowHeight': 500,  # Maximum row height for all rows.,
    'colWidth': {
        'imageField': 500
    },
    'renderer': {
        'imageField': 'html'  # Set the field to allow HTML.
    }
    'rowHeader': 'id'  # Selecting a custom column to be the first row, aka rowHeader.
}
```

## Embedding images, markdown and HTML.

This can be done in Python side, by converting everything to HTML. Just use [any markdown for Python library](https://github.com/Python-Markdown/markdown).

```python
from markdown import markdown
import base64
image_html = f'<img src="{image_url}" width=100 />'
image_html2 = f'<img src="data:image/png;base64,{base64.b64encode(image_bytes).decode()}" />'
markdown_html = markdown(markdown_raw)
```

Any then,

```python
PagedViewer(LIST_OF_RECORDS, renderers={
    "image_field": "html",
    "html_field": "html",
    "markdown_field": "html"
})
```

## Screenshots

![0.png](/screenshots/0.png)

## Related projects

- [pyhandsontable](https://github.com/patarapolw/pyhandsontable) - View a list of JSON-serializable dictionaries or a 2-D array, in HandsOnTable, in Jupyter Notebook.
video-curation 0.0.1
A package for curating video file collections, with ability to sync with youtube and archive.org video items.
License: MIT
Keywords: video internet-archive

|Build Status| |Documentation Status|

Video curation
--------------

A package for curating video file collections, with ability to sync with
youtube and archive.org video items.

For users
=========

-  `Autogenerated Docs on readthedocs (might be
   broken) <http://video_curation.readthedocs.io/en/latest/>`__.
-  Manually and periodically generated docs
   `here <https://sanskrit-coders.github.io/video_curation/build/html/>`__
-  For detailed examples and help, please see individual module files in
   this package.

Installation or upgrade:
------------------------

-  ``sudo pip install video_curation -U``
-  ``sudo pip install git+https://github.com/sanskrit-coders/video_curation/@master -U``
-  `Web <https://pypi.python.org/pypi/video_curation>`__.

For contributors
================

Contact
-------

Have a problem or question? Please head to
`github <https://github.com/sanskrit-coders/video_curation>`__.

Packaging
---------

-  ~/.pypirc should have your pypi login credentials.

::

   python setup.py bdist_wheel
   twine upload dist/* --skip-existing

Build documentation
-------------------

-  sphinx html docs can be generated with ``cd docs; make html``

Testing
-------

Run ``pytest`` in the root directory.

Auxiliary tools
---------------

-  |Build Status|
-  |Documentation Status|
-  `pyup <https://pyup.io/account/repos/github/sanskrit-coders/video_curation/>`__

.. |Build Status| image:: https://travis-ci.org/sanskrit-coders/video_curation.svg?branch=master
   :target: https://travis-ci.org/sanskrit-coders/video_curation
.. |Documentation Status| image:: https://readthedocs.org/projects/video_curation/badge/?version=latest
   :target: http://video_curation.readthedocs.io/en/latest/?badge=latest