#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
from hashids import Hashids
import random


def get_session_id(key=None):
    '''
    This function generate random number from some seed.
    Args:
        key: string or integer
    Returns:
        Random 5 places ingeger.
    '''
    hashids = Hashids(min_length=8, salt=str(random.randint(0, 1000)))
    # binascii.hexlify(os.urandom(4))

    return hashids.encode(key)

if __name__ == '__main__':
    print(get_session_id(2))

@@ -50,16 +50,31 @@
 port os%0A
+import random%0A%0A
 from has
@@ -93,31 +93,16 @@
 Hashids%0A
-import random%0A%0A
 %0Adef get
@@ -358,46 +358,8 @@
 0)))
-%0A    # binascii.hexlify(os.urandom(4))
 %0A%0A  

Remove trash from utils.