Server Init

Some general functions used by the iceprod server

iceprod.server.find_module_recursive(name, path=None)[source]

Recursively search for submodule. Submodules must be separated with a ‘.’

iceprod.server.listmodules(package_name='')[source]

List modules in a package or directory

iceprod.server.run_module(name, *args, **kwargs)[source]

Import and start the module

class iceprod.server.GlobalID[source]

Global ID configuration and generation

string = <module 'string' from '/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/string.py'>
CHARS = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
CHARS_LEN = 62
INTS_DICT = {'0': 52, '1': 53, '2': 54, '3': 55, '4': 56, '5': 57, '6': 58, '7': 59, '8': 60, '9': 61, 'A': 26, 'B': 27, 'C': 28, 'D': 29, 'E': 30, 'F': 31, 'G': 32, 'H': 33, 'I': 34, 'J': 35, 'K': 36, 'L': 37, 'M': 38, 'N': 39, 'O': 40, 'P': 41, 'Q': 42, 'R': 43, 'S': 44, 'T': 45, 'U': 46, 'V': 47, 'W': 48, 'X': 49, 'Y': 50, 'Z': 51, 'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
IDLEN = 15
MAXSITEID = 10000000000
MAXLOCALID = 1000000000000000
classmethod int2char(i)[source]
classmethod char2int(c)[source]
classmethod siteID_gen()[source]

Generate a new site id

classmethod globalID_gen(id, site_id)[source]

Generate a new global id given a local id and site id

classmethod localID_ret(id, type='str')[source]

Retrieve a local id from a global id

classmethod siteID_ret(id, type='str')[source]

Retrieve a site id from a global id

iceprod.server.salt(length=2)[source]

Returns a string of random letters

class iceprod.server.KwargConfig[source]

A way to validate kwargs passed in to a class

validate(kwargs)[source]
iceprod.server.get_pkgdata_filename(package, resource)[source]

Get a filename for a resource bundled within the package

iceprod.server.get_pkg_binary(package, binary)[source]

Try finding the binary path based on the python package