c.l.c.tokens : module documentation

Part of canonical.launchpad.components

Utility methods for random token generation.
Function create_token Create a random token string.
Function create_unique_token_for_table Create a new unique token in a table.
def create_token(token_length):
Create a random token string.
Parameterstoken_lengthSpecifies how long you want the token.
def create_unique_token_for_table(token_length, column):
Create a new unique token in a table.

Generates a token and makes sure it does not already exist in the table and column specified.

Parameterstoken_lengthThe length for the token string
columnDatabase column where the token will be stored.
ReturnsA new token string
API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.