Importer
Utilities for discovering and importing modules within a package — used internally to find your project's models, extensions, and generators.
grace.importer
import_package_modules
import_package_modules(package, shallow=True)
Import all modules in the package and yield them in order.
| PARAMETER | DESCRIPTION |
|---|---|
package
|
The package to import modules from.
TYPE:
|
shallow
|
Whether to import only the top-level package (default: True).
TYPE:
|
Source code in grace/importer.py
11 12 13 14 15 16 17 18 19 20 21 22 | |
find_all_importables
find_all_importables(package, shallow=True)
Find importable modules in the project and return them in order.
| PARAMETER | DESCRIPTION |
|---|---|
package
|
The package to search for importable.
TYPE:
|
shallow
|
Whether to search only the top-level package (default: True).
TYPE:
|
Source code in grace/importer.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |