Skip to main content

lexeme-type

Tests Coverage Mypy Ruff Install CSpell

GitHub Release PyPI - Version Pepy Total Downloads PyPI - Downloads GitHub stars

Lexeme type

Lightweight no-dependency helper for treating singular and plural spellings as equivalent.

A drop-in str subclass that normalizes English nouns so that their singular and plural forms compare as equal, hash to the same key, and work inside Pydantic v2 models. Ignores capitalization.

Examples

>>> from lexeme_type.lexeme import Lexeme
>>> Lexeme("reader") == "readers" == Lexeme("readers")
True
>>> {Lexeme("analyses"): 1} == {"analysis": 1}
True

>>> from pydantic import BaseModel
>>> class _Plugin(BaseModel):
...     kind: Lexeme
...     interface: Lexeme
...
>>> model = _Plugin(kind="reader", interface="readers")
>>> model.kind == model.interface == "reader"
True

Metadata

Release files for lexeme-type 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lexeme-type 1.1.1
File Size Uploaded Provenance Actions
lexeme_type-1.1.1.tar.gz 10.5 kB Without provenance Details for lexeme_type-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lexeme-type 1.1.1
File Interpreter ABI Platform Actions
lexeme_type-1.1.1-py3-none-any.whl Python 3 none any Details for lexeme_type-1.1.1-py3-none-any.whl

Total release size: 20.3 kB

Release files / lexeme_type-1.1.1.tar.gz

Download URL lexeme_type-1.1.1.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
15c6cb4c58826753347be7c8df52eda5158952a398454b61df89cdfbe96d4239
BLAKE2b-256 checksum
How to use checksums
f6bbba4840b5a0b8175dba78bf334aa5b36d31f9f9c6867bb3f115c67eadffac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / lexeme_type-1.1.1-py3-none-any.whl

Download URL lexeme_type-1.1.1-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
670bf122c1bb44153dc80c359d70e5554943f161744c0da816db746d0c6814df
BLAKE2b-256 checksum
How to use checksums
610ab426c2705b926b4bc1aaaf704ef1af6133402018c128747f80336868c7bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for lexeme-type 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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