Classes | Functions | Variables
pyclearsilver.guid Namespace Reference

Classes

class  CircularSet
 A simple circular set to ensure we don't duplicate GUIDs in the same millisecond. More...
 

Functions

def decode64Char (c)
 
def encode64Char (i)
 
def extract_ip (guid)
 
def extract_random (guid)
 
def extract_time (guid)
 
def generate (time_t=None)
 Public module functions. More...
 
def main (argv, stdout, environ)
 
def pack64 (i, bytes=6)
 
def test ()
 TESTING OF GUID CLASS ###. More...
 
def unpack64 (s, bytes=6)
 
def usage (progname)
 

Variables

 c = encode64Char(i)
 
string hexip = ''
 
string InvalidGUID = "Invalid GUID"
 
string ip = ''
 
 ipaddr64 = pack64(ipaddr)
 
 ipaddrStr = socket.inet_aton(ip)
 
 j = decode64Char(c)
 
string lastguid = ''
 
 lock = threading.RLock()
 
 MAX_RANDOM = sys.maxint
 global module variables More...
 
 queue = CircularSet()
 
int QUEUE_SIZE = 100
 
 rand = random.Random()
 

Detailed Description

usage: %(progname)s [args]

Function Documentation

def pyclearsilver.guid.decode64Char (   c)

Definition at line 107 of file guid.py.

def pyclearsilver.guid.encode64Char (   i)

Definition at line 91 of file guid.py.

def pyclearsilver.guid.extract_ip (   guid)
Extracts the ip portion out of the guid and returns it
   as a string like 10.10.10.10

Definition at line 217 of file guid.py.

def pyclearsilver.guid.extract_random (   guid)
Extracts the random bits from the guid (returns the bits in decimal)

Definition at line 232 of file guid.py.

def pyclearsilver.guid.extract_time (   guid)
Extracts the time portion out of the guid and returns the 
   number of seconds since the epoch as a float

Definition at line 208 of file guid.py.

def pyclearsilver.guid.generate (   time_t = None)

Public module functions.

Generates a new guid

Definition at line 178 of file guid.py.

def pyclearsilver.guid.main (   argv,
  stdout,
  environ 
)

Definition at line 248 of file guid.py.

def pyclearsilver.guid.pack64 (   i,
  bytes = 6 
)

Definition at line 97 of file guid.py.

def pyclearsilver.guid.test ( )

TESTING OF GUID CLASS ###.

Definition at line 242 of file guid.py.

def pyclearsilver.guid.unpack64 (   s,
  bytes = 6 
)

Definition at line 117 of file guid.py.

def pyclearsilver.guid.usage (   progname)

Definition at line 245 of file guid.py.

Variable Documentation

pyclearsilver.guid.c = encode64Char(i)

Definition at line 130 of file guid.py.

string pyclearsilver.guid.hexip = ''

Definition at line 87 of file guid.py.

string pyclearsilver.guid.InvalidGUID = "Invalid GUID"

Definition at line 206 of file guid.py.

string pyclearsilver.guid.ip = ''

Definition at line 78 of file guid.py.

pyclearsilver.guid.ipaddr64 = pack64(ipaddr)

Definition at line 135 of file guid.py.

pyclearsilver.guid.ipaddrStr = socket.inet_aton(ip)

Definition at line 88 of file guid.py.

pyclearsilver.guid.j = decode64Char(c)

Definition at line 131 of file guid.py.

string pyclearsilver.guid.lastguid = ''

Definition at line 80 of file guid.py.

pyclearsilver.guid.lock = threading.RLock()

Definition at line 79 of file guid.py.

pyclearsilver.guid.MAX_RANDOM = sys.maxint

global module variables

Definition at line 76 of file guid.py.

pyclearsilver.guid.queue = CircularSet()

Definition at line 172 of file guid.py.

int pyclearsilver.guid.QUEUE_SIZE = 100

Definition at line 70 of file guid.py.

pyclearsilver.guid.rand = random.Random()

Definition at line 77 of file guid.py.



pyclearsilver
Author(s): Scott Noob Hassan
autogenerated on Mon Jun 10 2019 15:51:13