rpu

Random Python Utilities is a library that contains stuff that (I know I) and you probably are tired of adding to all of your projects. But with rpu you can just add it as a requirement and no more copy pasting! Main benefit of using rpu over copy pasting is that if there is a bug found with the code, instead of having to fix it in all of your projects it can just be fixed in the library and then its fixed for everyone.

Key Features

Custom Extenstions for library specific utilities

For this, you can use the CLI commands install and uninstall to install utilities, and uninstall utilities. You can also use the upload command to upload utilities to the server for others to use.

Grammar

  • Plural
  • possessive
  • ordinal

Numbers

  • get_percentage
  • get_percent_of

Iterables

  • chunk
  • get

async

  • run_in_executor
  • execute_func

CLI

  • command infrustructure

Consts

  • MISSING

Dicts

  • flip_dict

HTTP

  • Route
  • HTTPCodes

Objects

  • Object

Chars

  • Invisible Character(s)
  • Arrows (left, right, up, down)
  • Bullet Point

Installation

★ Python 3.9+ is required

Installing from pip

pip install -U rpu

Installing from source

py -m pip install -U git+https://github.com/cibere/rpu # requires git to be installed

Getting Help

Documentation Versions

There are currently two versions of the documentation being hosted.

Stable is the version that is on PYPI, while latest is the alpha/beta version on github

Examples

This library's github repository has a wide collection of examples. I try to have an example for basically everything inside the library. The examples can be found here

CLI Commands

  • help: shows this menu
  • version: gives you the version of rpu your using
  • docs: opens rpus docs
  • system-info: gives you system info
  • install: lets you install library specific utilities
  • uninstall: lets you uninstall library specific utilities
  • upload: lets you upload library specific utitilities to the server for others to install and use

To run a command, simply run py -m rpu <command name>

Update Log

0.0.3 (so far)

Breaking Changes

  • Support for python 3.8 has been dropped
  • The text/number arg in rpu.grammar.Plural, possessive(), ordinal(), and rpu.numbers.int_to_word is now positional only
  • removed numbers.int_to_word and numbers.word_to_int
  • removed http.QueryParams, http.Headers
  • rpu.http is now a folder instead of a file
  • http.Route has been moved to Route

Additions

Bug Fixes

  • Fixed bug where CLI command always returned cmd not found
  • fixed bug where pylance yelled at rpu.cli

0.0.2

Breaking Changes

  • name, description, and brief in ConsoleClient are not optional. If name is not given, it will be the functions name. If description is not given, it will be the commands docstring.
  • all async stuff have been moved under the rpu.async_ folder

Additions

Bug Fixes

  • Fixed bug where default help cmd in cli would not show description if brief was an empty string
  • Fixed bug where pylance would yell at you when chunking
  • fixed bug with get erroring when you try to use what it finds

0.0.1

Breaking Changes

None

Additions

Bug Fixes

None

Credits

Sub-modules

rpu.async_

Async specific utils And async versions

rpu.chars

Characters …

rpu.cli
rpu.consts

Constants …

rpu.dicts
rpu.grammar
rpu.http
rpu.iterables
rpu.librarys

This librarys folder can be used to add library specific utilities.

rpu.numbers
rpu.objects