Deprecated
- This repository was merged into anycase, and is now published as
py-anycaseon PyPI - This package now simply re-exports the
py-anycasepackage.
pycases
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
| Function | Output |
|---|---|
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pycases-0.1.4.tar.gz
(3.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycases-0.1.4.tar.gz.
File metadata
- Download URL: pycases-0.1.4.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc84c6fc14dcdfcd2a724d62cbd311eceb6405dab080fd7f643d0bb234d3edc5
|
|
| MD5 |
02bfa2a4eceddeb4f0fb82f1c3c6c82e
|
|
| BLAKE2b-256 |
d0de89993d65917ce67221183e8ec9da692a64f2957386d531205ec42a97a8e8
|
File details
Details for the file pycases-0.1.4-py3-none-any.whl.
File metadata
- Download URL: pycases-0.1.4-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97d58dec2fac5e2eff72c7360b3f603d0d15f822139692bde10293df328a321a
|
|
| MD5 |
946825cb5fa31db4db12eaa5225f7b81
|
|
| BLAKE2b-256 |
784dd24051665c468a4b5e5817daa0389dcc3de6e14526263d648cd4476e1ddf
|