🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

pycases

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pycases

A case conversion library with Unicode support

0.1.4
PyPI
Maintainers
1

Deprecated

pycases

PyPI version License Build Status

A case conversion library for Python.

Features

  • Automatic case detection, no need to specify the input case
  • Extremely fast, written in Rust ✨
  • Support for Unicode characters
  • Support for providing acronyms in title case

Supported cases

FunctionOutput
cases.to_camel(s)camelCase
cases.to_pascal(s)PascalCase
cases.to_snake(s)snake_case
cases.to_screaming_snake(s)SCREAMING_SNAKE_CASE
cases.to_kebab(s)kebab-case
cases.to_screaming_kebab(s)SCREAMING-KEBAB-CASE
cases.to_train(s)Train-Case
cases.to_lower(s)lower case
cases.to_title(s)Title Case
cases.to_upper(s)UPPER CASE

Getting started

Install using

pip install pycases

Now convert a string using the relevant function.

import cases

cases.to_snake("XMLHttpRequest") # returns "xml_http_request"

License

This project is licensed under the terms of the MIT license. See LICENSE for more details.

Keywords

convert

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts