Skip to main content

Python-based tool to quickly view data

Project description

Ever have a pile of data (stored as JSON objects) that you want to quickly visualize and scroll through? Here’s a simple package that will let you do just that. Fex just needs your data and (optionally) an HTML template file that specifies how to render that single object.

Installation

# from git repo
git clone https://github.com/arunchaganty/fex
pip install -e .

# OR from PIP
pip install fastex

Usage

Fex assumes that your data is formatted as .jsonl: each line is simply its own JSON object. For example, consider the following data.

{"id": 0, "title": "Test 1", "messages": [{"user": "A", "msg": "Hi"}, {"user": "B", "msg": "Hello! How's it going?"}, {"user": "A", "msg": "Good!"}]}
{"id": 1, "title": "Test 2", "messages": [{"user": "B", "msg": "I need help!"}, {"user": "A", "msg": "Uh oh! What happened?"}, {"user": "B", "msg": "Sorry, false alarm, everything is ok."}]}

Running fex view will launch a web server that visualizes each of these objects using a template rendered with Jinja. Fex provides a default visualization is already prettier than staring at JSON:

example/without_template.png

The real power of Fex comes from being able to quickly hack a template that you find more useful. For example, the above data represents a chat transcript and it would be much nicer to visualize it as such. To do so, first run fex init, which will copy over a template.html file that you can edit. Using the example template produces the following result:

example/with_template.png

Nice!

Notice the navbar at the top allows you to quickly toggle through input.

Frequently asked questions

  • Q: Can I use paths that are not data.jsonl or template.html?
    • A: Yes! Use the options -i or --input to specify the data file and -t or --template to specify the template file: fex view -i mydata.jsonl -t mytemplate.html.

  • Q: Can I use a custom port?
    • A: Yes! Use the options -p or --port: fex view -p 9000.

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

fastex-0.0.2.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

fastex-0.0.2-py2.py3-none-any.whl (6.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file fastex-0.0.2.tar.gz.

File metadata

  • Download URL: fastex-0.0.2.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fastex-0.0.2.tar.gz
Algorithm Hash digest
SHA256 afc3494ef7a941d567a3d738198bc990b1f227685b220a78835c4ce8cd4d5005
MD5 7aadd3813252f7cba71393b59f5fa3b2
BLAKE2b-256 c5355c87963161499235be09ae7642544b6776c6ed06706ac9e479f27fd2112f

See more details on using hashes here.

File details

Details for the file fastex-0.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for fastex-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 20dfb571722f1ed31db2a5e3d1b932a15730899bd4f022b82fb4a66f93a836b1
MD5 7d5f3ea982a9ed3d61084cad61f46a53
BLAKE2b-256 c7a5139d3953eb66e9a19b3159e6ec89ef06cde42db075cad247af5f1b24c61c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page