Skip to main content

nocaselist - A case-insensitive list for Python

Version on Pypi Test status (master) Docs status (master) Test coverage (master)

Overview

Class NocaseList is a case-insensitive list that preserves the lexical case of its items.

Example:

$ python
>>> from nocaselist import NocaseList

>>> list1 = NocaseList(['Alpha', 'Beta'])

>>> print(list1)  # Any access is case-preserving
['Alpha', 'Beta']

>>> 'ALPHA' in list1  # Any lookup or comparison is case-insensitive
True

The NocaseList class supports the functionality of the built-in list class of Python 3.14 on all Python versions it supports (except for being case-insensitive, of course).

The case-insensitivity is achieved by matching any key values as their casefolded values. By default, the casefolding is performed with str.casefold() for unicode string keys and with bytes.lower() for byte string keys. The default casefolding can be overridden with a user-defined casefold method.

Installation

To install the latest released version of the nocaselist package into your active Python environment:

$ pip install nocaselist

The nocaselist package has no prerequisite Python packages.

For more details and alternative ways to install, see Installation.

Documentation

Change History

Contributing

For information on how to contribute to the nocaselist project, see Contributing.

License

The nocaselist project is provided under the Apache Software License 2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nocaselist-2.2.1.tar.gz (112.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nocaselist-2.2.1-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file nocaselist-2.2.1.tar.gz.

File metadata

  • Download URL: nocaselist-2.2.1.tar.gz
  • Upload date:
  • Size: 112.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for nocaselist-2.2.1.tar.gz
Algorithm Hash digest
SHA256 bade0e96a104ac8ddae49c261aa7c27b5ae8d9434661c6cd8ec16f3cd5c677a1
MD5 aaa8287cfe0d253e7f36795077e51196
BLAKE2b-256 9842a98a7140f144937880cd839b2c3055c1aace3804b34f352af28afd6ac6fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for nocaselist-2.2.1.tar.gz:

Publisher: publish.yml on pywbem/nocaselist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nocaselist-2.2.1-py3-none-any.whl.

File metadata

  • Download URL: nocaselist-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for nocaselist-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0853202259f4d8b15a18abd89466eb26eaf3c7e889c9c99f87f5298e2dc315e7
MD5 a422d1693c2fc4bad18032923428b5cb
BLAKE2b-256 cd167039116f632e64d25f0362bbdcfb8458201623410289cddf0c8afa9c9c9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for nocaselist-2.2.1-py3-none-any.whl:

Publisher: publish.yml on pywbem/nocaselist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.2.1 This release

2 files

2.2.0

2 files

2.1.0

2 files

2.0.4

2 files

2.0.3

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.1.3

2 files

1.1.1

2 files

1.1.0

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page