Skip to main content

textcase logo

textcase

Python library for text case conversions.

Coveralls PyPI - Downloads PyPI - Version PyPI - Python Version

Documentation: https://zobweyt.github.io/textcase

PyPI: https://pypi.org/project/textcase

Features

  • Text case conversion: convert strings between various text cases (e.g., snake_case, kebab-case, camelCase, etc.).
  • Extensible: extend the library with custom word boundaries and cases.
  • Accurate: handles any word boundaries in strings including acronyms (as in "HTTPRequest").
  • Non-ASCII Support: handles non-ASCII characters seamlessly (no inferences on the input language itself is made).
  • Tiny, Performant & Zero Dependencies: a regex-free, efficient library that stays lightweight with no external dependencies.
  • 100% test coverage: every line of code is rigorously tested for reliability.
  • 100% type annotated codebase: full type annotations for best developer experience.

Installation

Create and activate a virtual environment and then install textcase:

pip install textcase

Usage

Convert a string to a text case:

import textcase

textcase.snake("Hello, world!")  # hello_world
textcase.constant("Hello, world!")  # HELLO_WORLD
textcase.kebab("Hello, world!")  # hello-world
textcase.middot("Hello, world!")  # hello·world
textcase.camel("Hello, world!")  # helloWorld
textcase.pascal("Hello, world!")  # HelloWorld
textcase.lower("Hello, world!")  # hello world
textcase.upper("Hello, world!")  # HELLO WORLD
textcase.title("Hello, world!")  # Hello World
textcase.sentence("Hello, world!")  # Hello world

See documentation for more usage examples.

Release files for textcase 0.4.5

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

Source distribution (sdist)

Source distribution for textcase 0.4.5
File Size Uploaded
textcase-0.4.5.tar.gz 7.0 kB Details

Built distribution (wheel)

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

Total release size: 13.5 kB

Release files / textcase-0.4.5.tar.gz

Download URL textcase-0.4.5.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
97fd08754b7dba9bfa5daf4ace474645f6b66409fb00f483c5de729e730f8e52
BLAKE2b-256 checksum
How to use checksums
c008991940591c7a8de25505a4e43642d1c2b54f43c3ed76f8c90f1df6ee9525
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2025.

Transparency log

Release files / textcase-0.4.5-py3-none-any.whl

Download URL textcase-0.4.5-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd5d6aaf653b339e3ac60ad96cfc960a94219a97da464eddeed7084f41774937
BLAKE2b-256 checksum
How to use checksums
5b486ea42c749608cfca883d5d8fae03edbcde636090d2bc751fd5da9157b451
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.5 This release

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release 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