Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

camelcasing-0.1.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

camelcasing-0.1.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file camelcasing-0.1.1.tar.gz.

File metadata

  • Download URL: camelcasing-0.1.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for camelcasing-0.1.1.tar.gz
Algorithm Hash digest
SHA256 698e58b26a6100e4230322644279f503361891a77215fcd085d8cb885d89ebc2
MD5 726ff9b76b3cae906eff4bd4854c42df
BLAKE2b-256 c70e26b5dfe45b93409c241eb8b7aa6ca922d6474bc2d9a7210c365b3f85e161

See more details on using hashes here.

File details

Details for the file camelcasing-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: camelcasing-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for camelcasing-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b5c79b3e3759453096d686b19fc4e19faa7ee50c8e4a5997c8026372e4cdfaec
MD5 a086f64deeb7c04b49f6a8f5b48f00fa
BLAKE2b-256 547819f041af5162eb63564303b08dd165e2a8ff5e9560d4969a1a29870e9ef6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page