Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Lettercase

CircleCI PyPI

A Python library for detecting and converting between various letter cases.

Supported cases:

  • snake_case
  • SCREAMING_SNAKE_CASE
  • Darwin_Case
  • dromedaryCase
  • PascalCase

Installation

Using pip

pip install lettercase

Usage

The basic usage of the library is pretty straight-forward.

To simply convert a string to another case:

>>> import lettercase

>>> lettercase.convert_to("helloWorld", "snake")
hello_world

To detect the case, use the detect_case function which returns a set of all possible cases for the given string.

>>> import lettercase

>>> lettercase.detect_case("helloWorld")
{LetterCase.DROMEDARY}

By default the function only checks as much of the string as is necessary to get a unique match, however, if you need to make sure that the letter case is correct for the entire string, you can pass fast_return=False.

Metadata

Release files for lettercase 0.3.2

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

Source distribution (sdist)

Source distribution for lettercase 0.3.2
File Size Uploaded
lettercase-0.3.2.tar.gz 7.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lettercase 0.3.2
File Interpreter ABI Platform
lettercase-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 18.8 kB

Release files / lettercase-0.3.2.tar.gz

Download URL lettercase-0.3.2.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1d31e0701e1d2538d40bd3cd1ee9890a1c609e224d637a3d117fe134d6f76f39
BLAKE2b-256 checksum
How to use checksums
af01a4f1e072e08ab50eadb3586810243c2bbe8121294ae58bef46ba2ead126d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.32.2 CPython/3.7.4

Release files / lettercase-0.3.2-py3-none-any.whl

Download URL lettercase-0.3.2-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
543ceba47c89bc9a675d8b02286d29965ec8d279fc82f058af1922cfcbab9503
BLAKE2b-256 checksum
How to use checksums
f963e3d613d3605ef39895151adc41d2c3ff2f54eae56c8fe109e2c0200a59f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.32.2 CPython/3.7.4
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