Python-CamelCaser
Python-CamelCaser is a Python package that provides functionality for finding real-world words in a string and reformatting strings into various standardized notations. It offers different modes to suit your specific formatting needs, including Camel case, Lower camel case, Snake case, Upper snake case, Kebab case, and Upper kebab case.
Features
- Word Detection: The package includes a word detection mechanism that can identify real-world words within a given string.
- Notation Transformation: Python-CamelCaser allows you to easily transform strings into various standardized notations, such as Camel case, Lower camel case, Snake case, Upper snake case, Kebab case, and Upper kebab case.
- Flexibility: The package provides different modes to cater to a wide range of formatting requirements, allowing you to choose the notation style that best suits your project or coding style.
Modes
| Mode | Input | Output |
|---|---|---|
| camel_case | verylongtestexample | VeryLongTestExample |
| lower_camel_case | verylongtestexample | veryLongTestExample |
| snake_case | verylongtestexample | very_long_test_example |
| upper_snake_case | verylongtestexample | Very_Long_Test_Example |
| kebab_case | verylongtestexample | very-long-test-example |
| upper_kebab_case | verylongtestexample | Very-Long-Test-Example |
Usage
Import
import camelcaser as cc
Usage with real world words without separators
input_word = "verylongtestexample"
# Camel case
camel_case = cc.make_camel_case(input_word)
print(f"Camel case: {camel_case}")
# Snake case
snake_case = cc.make_snake_case(input_word)
print(f"Snake case: {snake_case}")
Usage with separators
input_word = "very_long_test_example"
# Camel Case
camel_case = cc.make_camel_case(input_word)
# Snake Case
snake_case = cc.make_snake_case(input_word)
Usage with custom separator [;]
input_word = "Very;Long;Test;Example"
# Camel Case
camel_case = cc.make_camel_case(input_word, separator=separator)
# Snake Case
snake_case = cc.make_snake_case(input_word, separator=separator)
Examples
Examples with real world words without separators
| Mode | Input | Output |
|---|---|---|
| camel_case | verylongtestexample | VeryLongTestExample |
| lower_camel_case | verylongtestexample | veryLongTestExample |
| snake_case | verylongtestexample | very_long_test_example |
| upper_snake_case | verylongtestexample | Very_Long_Test_Example |
| kebab_case | verylongtestexample | very-long-test-example |
| upper_kebab_case | verylongtestexample | Very-Long-Test-Example |
Examples with separators
| Mode | Input | Output |
|---|---|---|
| camel_case | very_long_test_example | VeryLongTestExample |
| lower_camel_case | very_long_test_example | veryLongTestExample |
| lower_snake_case | very_long_test_example | very_long_test_example |
| upper_snake_case | very_long_test_example | Very_Long_Test_Example |
| kebab_case | very_long_test_example | very-long-test-example |
| upper_kebab_case | very_long_test_example | Very-Long-Test-Example |
| camel_case | very-long-test-example | VeryLongTestExample |
| lower_camel_case | very-long-test-example | veryLongTestExample |
| lower_snake_case | very-long-test-example | very_long_test_example |
| upper_snake_case | very-long-test-example | Very_Long_Test_Example |
| kebab_case | very-long-test-example | very-long-test-example |
| upper_kebab_case | very-long-test-example | Very-Long-Test-Example |
| camel_case | VeryLongTestExample | Verylongtestexample |
| lower_camel_case | VeryLongTestExample | verylongtestexample |
| lower_snake_case | VeryLongTestExample | Verylongtestexample |
| upper_snake_case | VeryLongTestExample | Verylongtestexample |
| kebab_case | VeryLongTestExample | Verylongtestexample |
| upper_kebab_case | VeryLongTestExample | Verylongtestexample |
| camel_case | veryLongTestExample | Verylongtestexample |
| lower_camel_case | veryLongTestExample | verylongtestexample |
| lower_snake_case | veryLongTestExample | Verylongtestexample |
| upper_snake_case | veryLongTestExample | Verylongtestexample |
| kebab_case | veryLongTestExample | Verylongtestexample |
| upper_kebab_case | veryLongTestExample | Verylongtestexample |
Examples with custom separator [;]
| Mode | Input | Output |
|---|---|---|
| camel_case | very;long;test;example | VeryLongTestExample |
| lower_camel_case | very;long;test;example | veryLongTestExample |
| lower_snake_case | very;long;test;example | very_long_test_example |
| upper_snake_case | very;long;test;example | Very_Long_Test_Example |
| kebab_case | very;long;test;example | very-long-test-example |
| upper_kebab_case | very;long;test;example | Very-Long-Test-Example |
| camel_case | Very;Long;Test;Example | VeryLongTestExample |
| lower_camel_case | Very;Long;Test;Example | veryLongTestExample |
Thank you
Metadata
Release files for python-camelcaser 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_camelcaser-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for python_camelcaser-1.0.2-py3-none-any.whl |
Release files / python_camelcaser-1.0.2-py3-none-any.whl
| Download URL | python_camelcaser-1.0.2-py3-none-any.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fbf0cd53a34bf15ff8ec53d04ce90e5e626857c3720e948f76651d5b5a6663dd
|
|
BLAKE2b-256 checksum How to use checksums |
b4c7f185a1bb585a4e21735f744ada5f70a8882f570e0433f79035088ec8a898
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for python-camelcaser 1.0.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.