Skip to main content

Base class to enable objects to be compared for similarity.

Project description

Introduction

Comparable is a library providing an abstract base class that enables subclasses to be compared for “similarity” based on attributes. Similarity is defined in each class to be a weighted average of attribute comparisons.

Getting Started

Requirements

  • Python 3

Installation

Comparable can be installed with pip:

pip install Comparable

After installation, Comparable can be used from its package:

python
>>> import comparable
comparable.__version__
>>> from comparable import Comparable

Comparable includes many generic comparable types:

python
>>> from comparable.basic import String, List
>>> from comparable.extra import TitleString

Project details


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