Case Switcher
Change the casing of a string.
This library provides functions to change the casing convention of a string.
Supported cases:
- camelCase
- dot.case
- kebab-case
- PascalCase
- path/case
- snake_case
- Title Case
- UPPER.DOT.CASE
- UPPER-KEBAB-CASE
- UPPER_SNAKE_CASE
Install
poetry add case-switcher
pip install case-switcher
Demo
import caseswitcher
sample = "avocado bagel-coffeeDONUTEclair_food.gravy"
caseswitcher.to_camel(sample) # -> "avocadoBagelCoffeeDONUTEclairFoodGravy"
caseswitcher.to_dot(sample) # -> "avocado.bagel.coffee.donut.eclair.food.gravy"
caseswitcher.to_kebab(sample) # -> "avocado-bagel-coffee-donut-eclair-food-gravy"
caseswitcher.to_pascal(sample) # -> "AvocadoBagelCoffeeDONUTEclairFoodGravy"
caseswitcher.to_path(sample) # -> "avocado/bagel/coffee/donut/eclair/food/gravy"
caseswitcher.to_snake(sample) # -> "avocado_bagel_coffee_donut_eclair_food_gravy"
caseswitcher.to_title(sample) # -> "Avocado Bagel Coffee DONUT Eclair Food Gravy"
# Deprecated, use `to_dot(sample).upper()` instead.
caseswitcher.to_upper_dot(sample) # -> "AVOCADO.BAGEL.COFFEE.DONUT.ECLAIR.FOOD.GRAVY"
# Deprecated, use `to_kebab(sample).upper()` instead.
caseswitcher.to_upper_kebab(sample) # -> "AVOCADO-BAGEL-COFFEE-DONUT-ECLAIR-FOOD-GRAVY"
# Deprecated, use `to_snake(sample).upper()` instead.
caseswitcher.to_upper_snake(sample) # -> "AVOCADO_BAGEL_COFFEE_DONUT_ECLAIR_FOOD_GRAVY"
Support The Developer
Metadata
Release files for case-switcher 1.3.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| case-switcher-1.3.13.tar.gz | 4.1 kB | Without provenance | Details for case-switcher-1.3.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| case_switcher-1.3.13-py3-none-any.whl | Python 3 | none | any | Details for case_switcher-1.3.13-py3-none-any.whl |
Total release size: 8.1 kB
Release files / case-switcher-1.3.13.tar.gz
| Download URL | case-switcher-1.3.13.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e8c9df5437ac58aa396617bde347093a025812b77fd73fa48439c3d4ae8294c8
|
|
BLAKE2b-256 checksum How to use checksums |
98ebe14630681b062aa9a50f3f2f7b8d454cddbae22c7e97110368ecc96aa835
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.6 Linux/6.2.6-76060206-generic
|
Release files / case_switcher-1.3.13-py3-none-any.whl
| Download URL | case_switcher-1.3.13-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
564e5dba2062e38862d1766187446362bbdaf9fe80eac9675757310d190712ca
|
|
BLAKE2b-256 checksum How to use checksums |
e7a5b52b6fef17c619734aea142ef8890bc9befee621edec2387d482eeaa27a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.6 Linux/6.2.6-76060206-generic
|
Security for case-switcher 1.3.13
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.