textcase

Python library for text case conversions

https://github.com/zobweyt/textcase

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.8%) to scientific vocabulary

Keywords

camel-case case constant-case conversion foss kebab-case lower-case middot-case mypy nix pascal-case pypi pytest python ruff sentence-case snake-case text title-case upper-case
Last synced: 6 months ago · JSON representation ·

Repository

Python library for text case conversions

Basic Info
Statistics
  • Stars: 214
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
camel-case case constant-case conversion foss kebab-case lower-case middot-case mypy nix pascal-case pypi pytest python ruff sentence-case snake-case text title-case upper-case
Created 11 months ago · Last pushed 8 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Codeowners Security

README.md

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:

sh pip install textcase

Usage

Convert a string to a text case:

```python import textcase

textcase.snake("Hello, world!") # helloworld textcase.constant("Hello, world!") # HELLOWORLD 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.

Owner

  • Login: zobweyt
  • Kind: user
  • Location: Moscow, Russia

Citation (CITATION.cff)

cff-version: 1.2.0
title: textcase
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Nikita
    family-names: Gaziev
    email: zobweyt@gmail.com
repository-code: "https://github.com/zobweyt/textcase"
url: "https://zobweyt.github.io/textcase/"
abstract: Python library for text case conversions
keywords:
  - camel case
  - case
  - constant case
  - conversion
  - foss
  - just
  - kebab case
  - lower case
  - middot case
  - mypy
  - nix
  - pascal case
  - pypi
  - pytest
  - python
  - ruff
  - sentence case
  - snake case
  - text
  - title case
  - upper case
  - uv
license: MIT
commit: 6b95985c579415be65158195d4adedb82b9d0389
version: 0.4.3
date-released: "2025-04-18"

GitHub Events

Total
  • Create event: 19
  • Issues event: 16
  • Release event: 9
  • Watch event: 189
  • Delete event: 5
  • Issue comment event: 5
  • Push event: 252
  • Pull request event: 8
Last Year
  • Create event: 19
  • Issues event: 16
  • Release event: 9
  • Watch event: 189
  • Delete event: 5
  • Issue comment event: 5
  • Push event: 252
  • Pull request event: 8

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 34,482 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 11
  • Total maintainers: 1
pypi.org: textcase

Python library for text case conversions.

  • Versions: 11
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 34,482 Last month
Rankings
Dependent packages count: 9.4%
Average: 31.1%
Dependent repos count: 52.8%
Maintainers (1)
Last synced: 6 months ago