Skip to main content

A package for Python utility functions.

Project description

BumBag

pypi python os license

ci status release docs coverage downloads black isort

About

A package for Python utility functions.

What is this package about? Is its aim to offer functionality like a multi-tool pocketknife? Or like the utility belt of a caped crusader? Well, the purpose of a bumbag is to put in all the things you need often! As such, the BumBag package is a collection of frequently used Python functions.

Dictionary definition

bumbag /ˈbʌmbæg/ (noun countable) - a small bag attached to a long strap that you fasten around your waist to keep money, keys, and other small things in.

Installation

bumbag is available on PyPI:

pip install bumbag

Usage

Quickly compare two Python sets with two_set_summary:

from bumbag.core import two_set_summary

x = {"a", "c", "b", "g", "h"}
y = {"c", "d", "e", "f", "g"}
summary = two_set_summary(x, y)
print(summary["report"])
    x (n=5): {'a', 'b', 'c', ...}
    y (n=5): {'c', 'd', 'e', ...}
x | y (n=8): {'a', 'b', 'c', ...}
x & y (n=2): {'c', 'g'}
x - y (n=3): {'a', 'b', 'h'}
y - x (n=3): {'d', 'e', 'f'}
x ^ y (n=6): {'a', 'b', 'd', ...}
jaccard = 0.25
overlap = 0.4
disjoint?: False
x == y: False
x <= y: False
x <  y: False
y <= x: False
y <  x: False

Don't forget to check out more examples and the API Reference.

Contributing

Have you ever caught yourself thinking: "Ahh ... I need that function again. I have to copy it from another project."? If you have, why not sharing your awesome utility function with the rest of the world?

To do so, check out the contributing guidelines and the guide for developer. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

bumbag was created by BumBag Developers. It is licensed under the terms of the BSD 3-Clause license.

Credits

bumbag was created with cookiecutter and the pypkgcookiecutter template.

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

bumbag-1.1.0.tar.gz (14.4 kB view hashes)

Uploaded Source

Built Distribution

bumbag-1.1.0-py3-none-any.whl (14.7 kB view hashes)

Uploaded 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