Converts PascalCase or snake_case strings to camelCase.
Project description
camelCasing Package
This package converts Pascal Case and snake_case strings into its camelCase equivalent.
Installation
pip install camelCasing
Basic Use
from camelCasing import camelCasing as cc
Its functionality can be used in at least two ways:
(1) Individually:
# recode a single string
cc.toCamelCase(s='TheQuickBrownFox', user_acronyms=None)
or (2) in list comprehensions:
# get camelCase replacements for an arbitrary dataframe
[cc.toCamelCase(s=s, user_acronyms=None) for s in df.columns]
User Defined Acronyms
One of the tricky problems facing camel case text generation is the problem of acronyms. This package allows for user defined acronyms that the program should look for and account for when creating its camelCase equivalent.
Consider the following example:
s = 'UefiDbx_UefiDbxKeyStatus'
cc.toCamelCase(s=s, user_acronyms=['WMI', 'FRU', 'SKU', 'UEFI']) # UEFIDbxUEFIDbxKeyStatus
s = 'iaasByMicrosoft'
cc.toCamelCase(s=s, user_acronyms=['IaaS']) # IaaSByMicrosoft
This functionality lets you have control over the acronyms that you want to keep and maintain.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file camelcasing-0.1.3.tar.gz
.
File metadata
- Download URL: camelcasing-0.1.3.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88f343c6050bd72a0b994012ef284d0e74ff03b376d78ce92856aebefad03b29 |
|
MD5 | 7f517c3f9b6942b18dfc4408cb6539e9 |
|
BLAKE2b-256 | 85dc627044290eb8c442c64391bcea2a4f7ac58384a5c203546c9ac0b861e045 |
File details
Details for the file camelcasing-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: camelcasing-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1db37fa2add25490b7cbdf62cf1fe2d3fe38752bdd463bef6e2cbaf8703686e |
|
MD5 | 34d923cb401efd87686ca62b3f492dbb |
|
BLAKE2b-256 | 45a9ef8b973f287536dce021822c9b054c0ca513e6480841b05e33b7b959785f |