Updated on 2024-10-29 GMT+08:00

Introducing MoXing Framework

Before using MoXing Framework, you need to introduce the MoXing Framework module at the beginning of the code.

Introducing MoXing Framework

Run the following code to import the MoXing module:

1
import moxing as mox

Related Notes

After the MoXing module is introduced, the standard logging module of Python is set to the INFO level, and the version number is printed. You can use the following API to reset the logging level:

1
2
3
4
import logging

from moxing.framework.util import runtime
runtime.reset_logger(level=logging.WARNING)

Before introducing MoXing, you can set the MOX_SILENT_MODE environment variable to 1 to prevent MoXing from printing the version number. Use the following Python code to configure the environment variable. You need to configure the environment variables before importing MoXing.

1
2
3
import os
os.environ['MOX_SILENT_MODE'] = '1'
import moxing as mox