Skip to content

A Python library for word case conversions

Notifications You must be signed in to change notification settings

DogWars/camel_snake_kebab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Camel_SNAKE-kebab

Build Status

A Python library for word case conversions.

This library is a port of the Clojure library with the same name by @qerub.

It is available on PyPI and can be installed with

pip install --user camel_snake_kebab

It was tested with Python 2.7 and Python 3.4.

Examples

>>> from camel_snake_kebab import *
>>> CamelCase('flux-capacitor')
'FluxCapacitor'
>>> SCREAMING_SNAKE_CASE('I am constant')
'I_AM_CONSTANT'
>>> kebab_case('object_id')
'object-id'
>>> HTTP_Header_Case('x-ssl-cipher')
'X-SSL-Cipher'
>>> dot_case('JAVA_VERSION')
'java.version'
>>> Dot_Case('JAVA_VERSION')
'Java.Version'

Available Conversion Functions

  • PascalCase aka CamelCase
  • camelCase
  • SCREAMING_SNAKE_CASE
  • Camel_Snake_Case
  • snake_case
  • kebab_case
  • Camel_Snake_Case
  • HTTP-Header-Case
  • dot_case
  • Dot_Case

You should be able to figure out all what all of them do.

Further Reading

See the homepage for the Clojure library at https://github.com/qerub/camel-snake-kebab for more information.

License

Copyright (C) 2015 Tobias Kortkamp

Copyright (C) 2012-2014 Christoffer Sawicki, ToBeReplaced & Brendan Bates

Distributed under the Eclipse Public License v1.0 (see epl-v10.html).

About

A Python library for word case conversions

Resources

Stars

Watchers

Forks

Packages

No packages published