celery.utils.imports
exception celery.utils.imports.NotAPackage[源代码]
celery.utils.imports.qualname(obj)
celery.utils.imports.instantiate(name, \args, **kwargs*)[源代码]
Instantiate class by name.
See .
celery.utils.imports.symbol_by_name(name, aliases={}, imp=None, package=None, sep=’.’, default=None, \*kwargs*)
The name should be the full dot-separated path to the class:
Example:
or using ‘:’ to separate module and symbol:
If aliases is provided, a dict containing short name/long name mappings, the name is looked up in the aliases first.
Examples:
celery.utils.imports.find_module(module, path=None, imp=None)[源代码]
Version of supporting dots.
celery.utils.imports.import_from_cwd(module, imp=None, package=None)[源代码]
Import module, but make sure it finds modules located in the current directory.
Modules located in the current directory has precedence over modules located in sys.path.
celery.utils.imports.reload_from_cwd(module, reloader=None)
Return the correct original file name of a module.