Skip to main content

A "utility belt" of commonly needed utility and helper functions

Project description

UBelt is a “utility belt” of commonly needed utility and helper functions.

  • Reusable code - Many functions in ubelt are simple to write yourself (e.g. take, memoize, ensure_unicode), but even re-writing trivial functions takes time better spent on more important tasks.

  • Easy access - The entire ubelt API is exposed at the top level. While the functions are defined in submodules, explicit imports make easy to access any function. There are also a small number of functions (e.g. ub.odict, ub.ddict, ub.flatten, which are aliases for collections.OrderedDict, collections.DefaultDict, and itertools.chain.from_iterable, respectively) that are essentially aliases for functions already in Python’s standard library. I found myself using these functions so much that I wanted easier access to them, thus they are included in ubelt.

  • Extra batteries - Python’s standard library is “batteries included” and provides great APIs for a variety of tasks. UBelt both extends these batteries and provides simplified interfaces to others.

  • Copy paste - It is often not desirable to add extra dependencies to code. While I encourage installation and use of this module, I realize that option is not always feasible. Most (but not all) functions were also written in a way where they can be copy and pasted into your packages own utility library without needing to add a dependency on ubelt.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

ubelt-0.1.0-py2.py3-none-any.whl (155.8 kB view hashes)

Uploaded Python 2 Python 3

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