Writing Style Converter
Overview
The WSC (writing_style_converter) library provides a utility for converting dictionaries between different naming conventions.
from writing_style_converter import WSC
all_case_dict = {
"snake_case": {"value_one": 123, "value_two": [{"value_three": 123}]},
"kebab-case": {"value-one": 123, "value-two": [{"value-three": 123}]},
"camelCase": {"valueOne": 123, "valueTwo": [{"valueThree": 123}]},
"PascalCase": {"ValueOne": 123, "ValueTwo": [{"ValueThree": 123}]},
}
# Example with humidities set to True (default)
wsc_dict = WSC(all_case_dict)
# Access different naming conventions
print(wsc_instance.value) # Original dictionary
print(wsc_instance.snake) # Converted to snake_case
print(wsc_instance.kebab) # Converted to kebab-case
print(wsc_instance.camel) # Converted to camelCase
print(wsc_instance.pascal) # Converted to PascalCase
# Example with humidities set to False
wsc_dict_humidities = WSC(all_case_dict, humidities=False)
print(wsc_instance_without_humidities.snake) # Converted to snake_case without humidities
The humidities parameter controls whether the conversion process includes nested dictionaries and lists. When set to True (default), the conversion includes nested structures. When set to False, only the top-level dictionary is converted.
Installation
pip install writing_style_converter
Metadata
Release files for writing-style-converter 0.0.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| writing_style_converter-0.0.12.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| writing_style_converter-0.0.12-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.2 kB
Release files / writing_style_converter-0.0.12.tar.gz
| Download URL | writing_style_converter-0.0.12.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
008bfce1f32926a8691305f0d63319a427a8d5c8d60c421e5302d2208b66d052
|
|
BLAKE2b-256 checksum How to use checksums |
4c4442e350f981c2f7807b249c0bf85f5633fc474da3b55f68b3aaa4e99331c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / writing_style_converter-0.0.12-py3-none-any.whl
| Download URL | writing_style_converter-0.0.12-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cdafa01337522fe59778e4811e7b69b8b3d7934d90b762e92b5456cc13e4215d
|
|
BLAKE2b-256 checksum How to use checksums |
412919611e966d12c0a30174ba739261ce8f9acd6c741601bc003f5cfa906fb2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|