nuka.utils

nuka.utils.secret

class nuka.utils.secret(value, alphabet=None, length=16)[source]

secret word generation:

>>> s = secret('something')
>>> s.next()
'F)>x|o;J7sOhWV~F'
>>> s.next()
'DP@:?|v%LaSB2v?b'

You can use your own alphabet:

>>> s = secret('something', alphabet='abc')
>>> s.next()
'bbbbcaaacacbbcbb'

Or just ascii letters/digits:

>>> s = secret('something', alphabet='ascii')
>>> s.next()
'FxoJ7sOhWVFYRN7v'

You can also change the length:

>>> s = secret('something', alphabet='ascii', length=3)
>>> s.next()
'Fxo'

nuka.utils.chmod

nuka.utils.chmod(dst, mod, recursive=False)[source]

chmod using command line

nuka.utils.chown

nuka.utils.chown(dst, own, recursive=False)[source]

chown using command line

nuka.utils.makedirs

nuka.utils.makedirs(dirname, mod=None, own=None)[source]

create directories. return {'changed': True|False}