demo signal buttons
This commit is contained in:
parent
e274e91dcb
commit
634c652d57
6 changed files with 1680 additions and 980 deletions
28
oedb/resources/demo/__init__.py
Normal file
28
oedb/resources/demo/__init__.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
"""
|
||||
Demo package for the OpenEventDatabase.
|
||||
This package contains modules for the demo endpoints.
|
||||
"""
|
||||
|
||||
from oedb.resources.demo.demo_main import demo_main
|
||||
from oedb.resources.demo.demo_traffic import demo_traffic
|
||||
from oedb.resources.demo.demo_view_events import demo_view_events
|
||||
|
||||
# Import DemoResource class from the original demo.py file
|
||||
import sys
|
||||
import os
|
||||
import importlib.util
|
||||
|
||||
# Get the path to the original demo.py file
|
||||
demo_py_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'demo.py')
|
||||
|
||||
# Load the demo.py module
|
||||
spec = importlib.util.spec_from_file_location("oedb.resources.demo_original", demo_py_path)
|
||||
demo_original = importlib.util.module_from_spec(spec)
|
||||
sys.modules["oedb.resources.demo_original"] = demo_original
|
||||
spec.loader.exec_module(demo_original)
|
||||
|
||||
# Get the demo object from the original module
|
||||
demo = demo_original.demo
|
||||
|
||||
# Export the demo resources and the demo object
|
||||
__all__ = ['demo_main', 'demo_traffic', 'demo_view_events', 'demo']
|
Loading…
Add table
Add a link
Reference in a new issue