bio.lookup()¶
Internal name resolution used by fetch().
Overview¶
lookup() resolves dotted names (no slashes) through Python modules and configured roots. It is called internally by fetch() when the specifier contains no slashes.
Most users should use fetch() directly — it handles all specifier types and calls lookup() automatically when needed.
See fetch() → Resolution Order for the complete resolution rules.
When lookup() is Used¶
# fetch() calls lookup() for dotted names (no slashes)
bio.fetch("scenarios.mutualism")
# → internally calls lookup("scenarios.mutualism")
# fetch() does NOT call lookup() for paths (has slashes)
bio.fetch("catalog/scenarios/mutualism")
# → direct DAT load, no lookup
Resolution Order¶
When lookup(name) is called:
- Python modules — check
sys.modulesfor first segment, then navigate with getattr - Configured roots — scan mounts and sync_folders, convert dots to path separators
- Dereference — after finding root, remaining dots dereference into content via
gets()