diff options
Diffstat (limited to 'third_party/python/slugid/slugid/__init__.py')
-rw-r--r-- | third_party/python/slugid/slugid/__init__.py | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/third_party/python/slugid/slugid/__init__.py b/third_party/python/slugid/slugid/__init__.py new file mode 100644 index 0000000000..7953f444aa --- /dev/null +++ b/third_party/python/slugid/slugid/__init__.py @@ -0,0 +1,48 @@ +# -*- 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 +""" +from .slugid import decode, encode, nice, v4 + +__title__ = 'slugid' +__version__ = '2.0.0' +__author__ = 'Peter Moore' +__license__ = 'MPL 2.0' +__all__ = [ + 'decode', + 'encode', + 'nice', + 'v4', +] |