Skip to main content

tinydb-viewer

PyPI version shields.io PyPI license

View records generated from TinyDB and alike (e.g. list of dictionaries.)

Installation

Method 1:

$ pip install tinydb-viewer

Method 2:

  • Clone the project from GitHub
  • Get poetry and poetry install tinydb-viewer --path PATH/TO/TINYDB/VIEWER

Usage

Run a server initiation script first. This will allow you to edit the data as well.

from tinydb_viewer import TinyDB
TinyDB('db.json').runserver()

Then, in IPython or in Jupyter Notebook,

>>> from tinydb_viewer import TinyDB
>>> tdb = TinyDB('db.json')
>>> tdb.search(tdb.query['foo'] == 'bar', sort_func=lambda x: x['baz'])
>>> tdb.view()
'The first page is shown.'
>>> tdb.view(-1)
'The last page is shown.'
>>> tdb.previous()
'The previous page (i-1) is shown.'
>>> tdb.next()
'The next page (i+1) is shown.'

Bonus

I extended TinyDB a little. My TinyDB is 'ensure_ascii' = False by default, so that the file is a little smaller.

Also, it will use tinydb-constraint by default, if it is installed.

Screenshots

  • tinydb-constraint - Apply constraints before inserting and updating TinyDB records.

Metadata

Release files for tinydb-viewer 0.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tinydb-viewer 0.2.7
File Size Uploaded
tinydb-viewer-0.2.7.tar.gz 213.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tinydb-viewer 0.2.7
File Interpreter ABI Platform
tinydb_viewer-0.2.7-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 1.1 MB

Release files / tinydb-viewer-0.2.7.tar.gz

Download URL tinydb-viewer-0.2.7.tar.gz
Size 213.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e63154d7f32ac41bd5ff259378ce62f0e3de22feedd35844f8bdab8c42793bc1
BLAKE2b-256 checksum
How to use checksums
5636dc0ffd5c9ce2e387a22b20ba4738cd310dd2cb4cc96f9d9bc6b353e1bddb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.11.5 CPython/3.7.0 Darwin/17.7.0

Release files / tinydb_viewer-0.2.7-py2.py3-none-any.whl

Download URL tinydb_viewer-0.2.7-py2.py3-none-any.whl
Size 857.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
2987e8d800f5d21ee69bb70fb98f5a1873371c0be6891232fbbde0310ad375a1
BLAKE2b-256 checksum
How to use checksums
9c34ee9f46456573a4f777f60da4959265fa22909d4c160c538db650bb8a1644
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.11.5 CPython/3.7.0 Darwin/17.7.0

Release history Release notifications | RSS feed

This release

0.2.7 This release

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page