Skip to main content

Invoke native applications to view files

PyPI Python 3.13 Python 3.12 Build Status

Invoke native applications to view and render data from files.

Features:

  • Uses Dash to render Excel, CSV and TSV files.
  • Render PDF and HTML in the default web browser.

Features on macOS:

  • Default web browser used for HTML, Preview.app used for PDF files.
  • Resize the window and a per display basis.
  • Go to a specified page in Preview.app.
  • Multiple file rendering in browser tabs.

The features on macOS are needed for other operating systems.

Installing

The easiest way to install the command line program is via the pip installer:

pip3 install zensols.rend

For macOS systems, also install AppleScript: pip install applescript.

Usage

Create a configuration file with the dimensions of each of the screens you work with and where you want Preview.app to be displayed. You can validate these configurations by having the application echo them back at you:

$ rend config

Command Line

Invoke the application to show the file and display it:

$ rend example.pdf

See the configuration file example.

From Python

The package is designed to be easy invoke from Python as well (note the parenthesis needed to make the instance):

from zensols.rend import ApplicationFactory

if (__name__ == '__main__'):
    app = ApplicationFactory().get_instance()
    app('test-resources/sample.pdf')

Pandas DataFrames can be rendered using the browser API (note the lack of parenthesis as it is called as a class method):

from zensols.rend import BrowserManager, ApplicationFactory
import pandas as pd

if (__name__ == '__main__'):
    mng: BrowserManager = ApplicationFactory.get_browser_manager()
    url = 'https://raw.githubusercontent.com/scpike/us-state-county-zip/master/geo-data.csv'
    df = pd.read_csv(url)
    mng.show(df)

Documentation

See the full documentation. The API reference is also available.

Contributing

Currently the more advanced features are only available on macOS. However, the API is written to easily add other operating systems as plugins. If you would like to write one for other operating systems, please contact and/or submit a pull request.

Changelog

An extensive changelog is available here.

Community

Please star this repository and let me know how and where you use this API. Contributions as pull requests, feedback, and any input is welcome.

License

MIT License

Copyright (c) 2022 - 2026 Paul Landes

Metadata

Release files for zensols-rend 1.3.3

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

Built distribution (wheel)

Table of built distributions (wheels) for zensols-rend 1.3.3
File Interpreter ABI Platform
zensols_rend-1.3.3-py3-none-any.whl Python 3 none any Details

Release files / zensols_rend-1.3.3-py3-none-any.whl

Download URL zensols_rend-1.3.3-py3-none-any.whl
Size 29.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c432128eba8fe2b8cd6a23149f055bc5a64036c81555a3452df39565a307d378
BLAKE2b-256 checksum
How to use checksums
84f496c70dac2a5e4571cdf3cd1d155836ff024b8c02871155b8cebe740e8ff7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

1.3.3 This release

1 release file

1.3.2

1 release file

1.3.1

1 release file

1.3.0

1 release file

1.2.5

1 release file

1.2.4

1 release file

1.2.3

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.0

1 release file

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