Skip to main content

pirrtools

I find them useful

Description

pirrtools is a set of bespoke tools I wanted preserved in a library. It provides various utilities, with key features including a pandas accessor for caching non-conforming datasets and beautiful Rich table formatting.

Documentation

📚 Full Documentation - Complete guides, examples, and API reference

Features

  • Rich Table Formatting: Transform pandas DataFrames into beautiful, styled terminal tables with gradients, colors, and professional formatting
  • Pandas Caching: Easily cache and load pandas DataFrames and Series, even those with non-conforming datasets using feather format
  • Interactive Tutorial: Launch an interactive tutorial with pirrtools-tutorial command
  • Development Utilities: Path management, module reloading, and instance finding tools

Requirements

  • Python 3.9 or greater
  • pandas
  • rich
  • feather-format

Installation

Install pirrtools using pip:

pip install pirrtools

Quick Start

Beautiful Rich Tables

import pandas as pd
import pirrtools
from rich.console import Console

# Create sample data
df = pd.DataFrame({
    'Product': ['Widget A', 'Widget B', 'Widget C'],
    'Q1': [100, 150, 200],
    'Q2': [120, 180, 220], 
    'Q3': [140, 200, 180],
    'Q4': [160, 170, 240]
})

# Create beautiful table with gradient background
console = Console()
table = df.pirr.to_rich(
    bg="viridis",  # Gradient colormap
    title="📊 Quarterly Sales Report",
    format="${:.0f}K"  # Format numbers
)
console.print(table)

Pandas Caching

import pirrtools as pirr
import pandas as pd

# Create a DataFrame
df = pd.DataFrame(1, range(10), ['a', 'b', 'c']).rename_axis('N')

# Cache the DataFrame
df.pirr.to_cache('name_of_cache_path')

# Load the cached DataFrame
loaded_df = pirr.load_cache('name_of_cache_path')

Interactive Tutorial

# Launch interactive tutorial
pirrtools-tutorial

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Authors

  • Sean Smith

Metadata

Release files for pirrtools 0.2.20

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

Source distribution (sdist)

Source distribution for pirrtools 0.2.20
File Size Uploaded Provenance Actions
pirrtools-0.2.20.tar.gz 52.9 kB With provenance Details for pirrtools-0.2.20.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pirrtools 0.2.20
File Interpreter ABI Platform Actions
pirrtools-0.2.20-py3-none-any.whl Python 3 none any Details for pirrtools-0.2.20-py3-none-any.whl

Total release size: 97.1 kB

Release files / pirrtools-0.2.20.tar.gz

Download URL pirrtools-0.2.20.tar.gz
Size 52.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b632d1c96b3978f83d451f3f2f12d6a64feae7311e46925deee8d8bfafaedc25
BLAKE2b-256 checksum
How to use checksums
19c4a01fa3443addcce63d6dd7081916b988be4dc7bfa80879dd8742ccb4a1fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2025.

Transparency log

Release files / pirrtools-0.2.20-py3-none-any.whl

Download URL pirrtools-0.2.20-py3-none-any.whl
Size 44.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee76376ec74dc9b67ebff783d70c5b2bab1473bb5e011b5b420b148158084dc7
BLAKE2b-256 checksum
How to use checksums
b051721d91554d4d423f4e8aecba840716fba8268969c33eeb86dbe6644f550c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2025.

Transparency log

Security for pirrtools 0.2.20

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pirrtools-0.2.20.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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