Skip to content

nathforge/pydentifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pydentifier

Generates Python identifiers from English text. Useful for code generation.

Class name:

>>> pydentifier.upper_camel("I'm a class", prefix='')
'IAmAClass'

Function name:

>>> pydentifier.lower_underscore('This is a function', prefix='')
'this_is_a_function'

Reserved keyword:

>>> pydentifier.lower_underscore('class', prefix='')
'class_'

Internal method:

>>> pydentifier.lower_underscore("Shouldn't touch this", prefix='_')
'_should_not_touch_this'

Private method:

>>> pydentifier.lower_underscore("Can't touch this", prefix='__')
'__cannot_touch_this'

About

Generates Python identifiers from English text

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages