collation – Tools for working with collations.

    class pymongo.collation.Collation(locale, caseLevel=None, caseFirst=None, strength=None, numericOrdering=None, alternate=None, maxVariable=None, normalization=None, backwards=None, \*kwargs*)

    class pymongo.collation.CollationStrength

    An enum that defines values for strength on a Collation.

    • Differentiate base (unadorned) characters.

    • SECONDARY = 2

      Differentiate character accents.

    • TERTIARY = 3

      Differentiate character case.

    • QUATERNARY = 4

      Differentiate words with and without punctuation.

    • IDENTICAL = 5

      Differentiate unicode code point (characters are exactly identical).

    class

    An enum that defines values for alternate on a .

    • NON_IGNORABLE = ‘non-ignorable’

      Spaces and punctuation are treated as base characters.

    • SHIFTED = ‘shifted’

      Spaces and punctuation are distinguished regardless when the Collation strength is at least .

    class pymongo.collation.CollationCaseFirst

    An enum that defines values for case_first on a Collation.

    • UPPER = ‘upper’

      Sort uppercase characters first.

    • LOWER = ‘lower’

      Sort lowercase characters first.

    • OFF = ‘off’

      Default for locale or collation strength.

    class pymongo.collation.CollationMaxVariable

    An enum that defines values for max_variable on a .

    • SPACE = ‘space’