Files
tubestation/python/slugid/slugid/__init__.py
Peter Moore 85d6816a91 Bug 1194767 - use slugid 1.0.6 in ./mach taskcluster-graph command. r=wcosta
This included adding the slugid 1.0.6 python source code in /python since slugid
is now a dependency of the ./mach taskcluster-graph command, as well us updating
references that used it. Previously the implementation was in-tree.
2015-09-04 17:59:34 +02:00

44 lines
1.1 KiB
Python

# -*- coding: utf-8 -*-
# **************
# * Slugid API *
# **************
#
# @)@)
# _|_| ( )
# _(___,`\ _,--------------._ (( /`, ))
# `==` `*-_,' O `~._ ( ( _/ | ) )
# `, : o } `~._.~` * ',
# \ - _ O - ,'
# | ; - - " ; o /
# | O o ,-`
# \ _,-:""""""'`:-._ - . O /
# `""""""~'` `._ _,-`
# """"""
"""
SlugID: Base 64 encoded v4 UUIDs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Usage:
>>> import slugid
>>> s = slugid.nice()
>>> s
eWIgwMgxSfeXQ36iPbOxiQ
>>> u = slugid.decode(s)
>>> u
UUID('796220c0-c831-49f7-9743-7ea23db3b189')
>>> slugid.encode(u)
eWIgwMgxSfeXQ36iPbOxiQ
>>> slugid.v4()
-9OpXaCORAaFh4sJRk7PUA
"""
__title__ = 'slugid'
__version__ = '1.0.6'
__author__ = 'Peter Moore'
__license__ = 'MPL 2.0'
from .slugid import decode, encode, nice, v4