Skip to main content


Project description


from namae import titlize, untitlize

assert titlize("foo") == "Foo"
assert untitlize("Foo") == "foo"


assert pascalcase("foo-bar") == "FooBar"
assert camelcase("foo-bar") == "fooBar"

assert snakecase("IpAddress") == "ip_address"
assert snakecase("IPAddress") == "ip_address"
assert kebabcase("IPAddress") == "ip-address"
assert lispcase("IPAddress") == "ip-address"


from namae import normalize

# hyphen
assert normalize("foo-bar") == "foo_bar"

# invalid prefix
assert normalize("foo123") == "foo123"
assert normalize("123foo") == "n123foo"
assert normalize("+1") == "x1"
assert normalize("-1") == "x_1"

# python's keyword
assert normalize("while") == "while_"
assert normalize("def") == "def_"



from namae.go import goname

assert goname("foo-bar-boo") == 'FooBarBoo'
assert goname("foo_bar_boo") == 'FooBarBoo'

assert goname("api") == 'API'
assert goname("id") == 'ID'
assert goname("fooid") == 'Fooid'
assert goname("foo_id") == 'FooID'
assert goname("1times") == 'OneTimes'
assert goname("9times") == 'NineTimes'
assert goname("10times") == 'Num10Times'

Project details

Release history Release notifications | RSS feed

This version


Download files

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

Files for namae, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size namae-0.1-py2.py3-none-any.whl (4.3 kB) File type Wheel Python version 3.5 Upload date Hashes View
Filename, size namae-0.1.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page