petri.ext module

Python etensions and utilities.

petri.ext.pkg_2_envvar(name)[source]

Transform package name into config selector string.

Example

>>> pkg_2_envvar('a-pkg')
'A_PKG_CONFIG'

“In the face of ambiguity, refuse the temptation to guess.”

Return type:str
petri.ext.to_upper_underscore(name)[source]

Transform package name into uppercase with underscores.

Example

>>> pkg_2_uu('a-pkg')
'A_PKG'
Return type:str