Skip to content

Commit

Permalink
Expose resource loader functions in the resources submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
austinschneider committed Sep 16, 2024
1 parent b2eda5e commit 254eb2d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/resources.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
__all__ = ["load_flux", "load_detector", "load_processes", "fluxes", "detectors", "processes"]

from . import _util

load_flux = _util.load_flux
load_detector = _util.load_detector
load_processes = _util.load_processes

class ResourceList:
def __init__(self, resource_type, list_method, load_method):
self.__resource_type = resource_type
Expand All @@ -24,4 +30,5 @@ def __dir__(self):
detectors = ResourceList('detectors', _util.list_detectors, _util._get_detector_loader)
processes = ResourceList('processes', _util.list_processes, _util._get_process_loader)

del _util
del ResourceList

0 comments on commit 254eb2d

Please sign in to comment.