Skip to main content

Lib to pick the "best" item from a random sample

Project description

goodenough

A small Python lib that helps one to pick items from their collections / storages.

It's designed for tasks where you need a random item that is also not complete garbage like selecting the next song from a songs database to play on the radio.

To use this lib you should tell it how to get the sample of items (get_items) and how to sort them from good to bad (rules).

Optionaly, you can also reflect on how the items got sorted and which item has won (review_items).

All callbacks should be async in case you want to do I/O stuff (like talking to a storage).

See tests.

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

goodenough-0.0.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

goodenough-0.0-py3-none-any.whl (2.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