Skip to main content

Value scoring and best match picking.

Project description

Installing

pip3 install explore

Specific Usage

import explore

# yummy foods to choose from
foods = ('pasta', 'pork', 'broccoli', 'anchovy', 'peking duck')

# choosing during a keyboard stroke
food = explore.pick(foods, 'vorcloki')

Generic Usage

import explore

# lots of yummy food info
foods = food_api.get_all()

# match according to these attributes
fetch = lambda food: (food.id, food.name)

# returns value, NOT attribute matched against
food = explore.pick(foods, 'vorcloki', fetch = fetch)

Extended Usage

import explore

# lots of yummy food info
foods = food_api.get_all()

# match according to these attributes
fetch = lambda food: (food.id, food.name, food.color)

# this is a generator, iterating exhausts it
pairs = explore.generic(fetch, values, 'vorcloki') # [(food, score), ...]

# best matching one
food = explore.lead(pairs)

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

explore-0.0.0.tar.gz (2.2 kB view hashes)

Uploaded Source

Built Distribution

explore-0.0.0-py3-none-any.whl (3.5 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