# nocaselist - A case-insensitive list for Python
[![Version on Pypi](https://img.shields.io/pypi/v/nocaselist.svg)](https://pypi.python.org/pypi/nocaselist/)
[![Test status (master)](https://github.com/pywbem/nocaselist/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/pywbem/nocaselist/actions/workflows/test.yml?query=branch%3Amaster)
[![Docs status (master)](https://readthedocs.org/projects/nocaselist/badge/?version=latest)](https://readthedocs.org/projects/nocaselist/builds/)
[![Test coverage (master)](https://coveralls.io/repos/github/pywbem/nocaselist/badge.svg?branch=master)](https://coveralls.io/github/pywbem/nocaselist?branch=master)
# Overview
Class
[NocaseList](https://nocaselist.readthedocs.io/en/stable/reference.html#nocaselist.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](https://nocaselist.readthedocs.io/en/stable/reference.html#nocaselist.NocaseList)
class supports the functionality of the built-in
[list class of Python 3.8](https://docs.python.org/3.8/library/stdtypes.html#list)
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()](https://docs.python.org/3/library/stdtypes.html#str.casefold)
for unicode string keys and with
[bytes.lower()](https://docs.python.org/3/library/stdtypes.html#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](https://nocaselist.readthedocs.io/en/stable/intro.html#installation).
# Documentation
- [Documentation](https://nocaselist.readthedocs.io/en/stable/)
# Change History
- [Change history](https://nocaselist.readthedocs.io/en/stable/changes.html)
# Contributing
For information on how to contribute to the nocaselist project, see
[Contributing](https://nocaselist.readthedocs.io/en/stable/development.html#contributing).
# License
The nocaselist project is provided under the [Apache Software License
2.0](https://raw.githubusercontent.com/pywbem/nocaselist/master/LICENSE).
Raw data
{
"_id": null,
"home_page": "https://github.com/pywbem/nocaselist",
"name": "nocaselist",
"maintainer": "Andreas Maier",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "andreas.r.maier@gmx.de",
"keywords": null,
"author": "Andreas Maier",
"author_email": "andreas.r.maier@gmx.de",
"download_url": "https://files.pythonhosted.org/packages/cf/2e/4e7381b5552f530fa60f604a47bec08fe285bd3a4ee800cccdccfd978fa4/nocaselist-2.0.3.tar.gz",
"platform": "any",
"description": "# nocaselist - A case-insensitive list for Python\n\n[![Version on Pypi](https://img.shields.io/pypi/v/nocaselist.svg)](https://pypi.python.org/pypi/nocaselist/)\n[![Test status (master)](https://github.com/pywbem/nocaselist/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/pywbem/nocaselist/actions/workflows/test.yml?query=branch%3Amaster)\n[![Docs status (master)](https://readthedocs.org/projects/nocaselist/badge/?version=latest)](https://readthedocs.org/projects/nocaselist/builds/)\n[![Test coverage (master)](https://coveralls.io/repos/github/pywbem/nocaselist/badge.svg?branch=master)](https://coveralls.io/github/pywbem/nocaselist?branch=master)\n\n# Overview\n\nClass\n[NocaseList](https://nocaselist.readthedocs.io/en/stable/reference.html#nocaselist.NocaseList)\nis a case-insensitive list that preserves the lexical case of its items.\n\nExample:\n\n $ python\n >>> from nocaselist import NocaseList\n\n >>> list1 = NocaseList(['Alpha', 'Beta'])\n\n >>> print(list1) # Any access is case-preserving\n ['Alpha', 'Beta']\n\n >>> 'ALPHA' in list1 # Any lookup or comparison is case-insensitive\n True\n\nThe\n[NocaseList](https://nocaselist.readthedocs.io/en/stable/reference.html#nocaselist.NocaseList)\nclass supports the functionality of the built-in\n[list class of Python 3.8](https://docs.python.org/3.8/library/stdtypes.html#list)\non all Python versions it supports (except for being case-insensitive, of\ncourse).\n\nThe case-insensitivity is achieved by matching any key values as their\ncasefolded values. By default, the casefolding is performed with\n[str.casefold()](https://docs.python.org/3/library/stdtypes.html#str.casefold)\nfor unicode string keys and with\n[bytes.lower()](https://docs.python.org/3/library/stdtypes.html#bytes.lower)\nfor byte string keys. The default casefolding can be overridden with a\nuser-defined casefold method.\n\n# Installation\n\nTo install the latest released version of the nocaselist package into\nyour active Python environment:\n\n $ pip install nocaselist\n\nThe nocaselist package has no prerequisite Python packages.\n\nFor more details and alternative ways to install, see\n[Installation](https://nocaselist.readthedocs.io/en/stable/intro.html#installation).\n\n# Documentation\n\n- [Documentation](https://nocaselist.readthedocs.io/en/stable/)\n\n# Change History\n\n- [Change history](https://nocaselist.readthedocs.io/en/stable/changes.html)\n\n# Contributing\n\nFor information on how to contribute to the nocaselist project, see\n[Contributing](https://nocaselist.readthedocs.io/en/stable/development.html#contributing).\n\n# License\n\nThe nocaselist project is provided under the [Apache Software License\n2.0](https://raw.githubusercontent.com/pywbem/nocaselist/master/LICENSE).\n",
"bugtrack_url": null,
"license": "Apache Software License 2.0",
"summary": "A case-insensitive list for Python",
"version": "2.0.3",
"project_urls": {
"Bug Tracker": "https://github.com/pywbem/nocaselist/issues",
"Documentation": "https://nocaselist.readthedocs.io/en/latest/",
"Homepage": "https://github.com/pywbem/nocaselist",
"Source Code": "https://github.com/pywbem/nocaselist"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3ee43073ba656dc27da760ee4f55d4e9e57ea3ebe269e56d0488d1da659e8b98",
"md5": "e9ea70473b95676f95993966d41d441a",
"sha256": "31cd7c40f256d5295ea76823492787c60d1b2cdc7affe757b173cc92a6c3c2ff"
},
"downloads": -1,
"filename": "nocaselist-2.0.3-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "e9ea70473b95676f95993966d41d441a",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.6",
"size": 12909,
"upload_time": "2024-08-18T13:31:45",
"upload_time_iso_8601": "2024-08-18T13:31:45.555179Z",
"url": "https://files.pythonhosted.org/packages/3e/e4/3073ba656dc27da760ee4f55d4e9e57ea3ebe269e56d0488d1da659e8b98/nocaselist-2.0.3-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cf2e4e7381b5552f530fa60f604a47bec08fe285bd3a4ee800cccdccfd978fa4",
"md5": "5a9c2506abcff05500c3bb8b2abfc4ef",
"sha256": "55714da8433fb4843ce797404977e4385d5e3df9e4aa00f7dde983fd87410fef"
},
"downloads": -1,
"filename": "nocaselist-2.0.3.tar.gz",
"has_sig": false,
"md5_digest": "5a9c2506abcff05500c3bb8b2abfc4ef",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 29827,
"upload_time": "2024-08-18T13:31:47",
"upload_time_iso_8601": "2024-08-18T13:31:47.376947Z",
"url": "https://files.pythonhosted.org/packages/cf/2e/4e7381b5552f530fa60f604a47bec08fe285bd3a4ee800cccdccfd978fa4/nocaselist-2.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-18 13:31:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pywbem",
"github_project": "nocaselist",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [],
"tox": true,
"lcname": "nocaselist"
}