PWeb Project Structure
project
├── application
| ├── boot
| ├── config
| ├── app_config.py
| ├── asset_config.py
| └── module_registry.py
├── env.yml
├── pwebsm.yml
├── pweb_app.py
├── README.md
├── setup.py
└── venv
-
project : Directory of the project
-
application : Store all the module, configuration, and registry
-
boot : Default module of the system
-
config : Store all types of configuration files
-
app_config.py : Application environmental configuration parameters
-
asset_config.py : Resource configuration
-
module_registry.py : Hart of the system, Register all modules in this file.
-
-
-
env.yml : Help to overwrite configuration in production environment
-
pwebsm.yml : PWeb Source Manager, Manage source code and package installation
-
pweb_app.py : Starter of the Application, Project Run from this file
-
README.md : Basic instruction
-
setup.py : Listed Dependencies and project information
-
venv : Virtual Environment directory
-
module_registry.py
This file is responsible for resister modules of the system, If Modules not register here it will not work.
from pweb import PWebModuleRegister
from boot.boot_module import BootModule
class Register(PWebModuleRegister):
def get_module_list(self) -> list:
return [BootModule]
BootModule name of the module, and register for integrate of the system.
pweb_app.py
Starter of the project/application
python pweb_app.py