Skip to main content

A collection of Python utilities ported from the R ecosystem.

Project description

ruru

ruru

PyPI Version uv Ruff usethis

A collection of Python utilities ported from the R ecosystem.

Features

base module

The ruru.base module provides core utilities:

  • match_arg: A Python equivalent of R's match.arg function for verifying function arguments against a set of valid options.
  • pmatch: A Python equivalent of R's pmatch function for finding partial substring matches against a set of reference strings.

Inspired by the R base package.

config module

The ruru.config module gives an easy way to manage of configuration settings in Python applications via YAML files.

Recommended usage:

from importlib.resources import files
from ruru import config

config_path = files("<mypkg>.cli").joinpath("config.yml") 
config_dict = config.get(file = config_path)

Inspired by the R config package.

cli module

The ruru.cli module provides utilities for enhanced command-line interface output, including colored text, formatted headings, alert messages, and bullet-point lists.

Recommended usage:

from ruru import cli
cli.h1("Heading")
cli.alert("This is an alert message")

Inspired by the R cli package.

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

ruru-0.3.0.tar.gz (186.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ruru-0.3.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file ruru-0.3.0.tar.gz.

File metadata

  • Download URL: ruru-0.3.0.tar.gz
  • Upload date:
  • Size: 186.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.3

File hashes

Hashes for ruru-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7f2578272e8bf9a31b53cc3f76bf04de559c039c6a0448d8096b1f043c39c6ec
MD5 9f42a516edbadb2b729c1130758a689b
BLAKE2b-256 40918bf4aea2ce30450e55c2c35e0c8a6d2f5dac358796a551f4c55477fc7753

See more details on using hashes here.

File details

Details for the file ruru-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: ruru-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.3

File hashes

Hashes for ruru-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71c5f97c8a8aa8ccacfc0fa02e541f7504092272282441a1e7873403ccf9c8d5
MD5 f219194a07d47b473110c854e3c74e88
BLAKE2b-256 877d2633f8c8ab95d3e04523a64094b8ab67426cec85dac7bdb51b032fa6130f

See more details on using hashes here.

Supported by

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